1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

216 Commits

Author SHA1 Message Date
Reid Spencer
cb66ae964e Finish removal of EH usage from the Archive library. The REQUIRES_EH flag
in lib/Bytecode/Archive/Makefile is now removed. One small step closer to
a smaller LLVM.

llvm-svn: 29067
2006-07-07 20:56:50 +00:00
Chris Lattner
29fbce5a20 Fix Regression/Linker/2006-06-15-GlobalVarAnment.ll
llvm-svn: 28812
2006-06-16 01:24:04 +00:00
Chris Lattner
609f7e070d Fix linking of inline asm objects.
llvm-svn: 28640
2006-06-01 19:14:22 +00:00
Chris Lattner
c84c3d7c32 Add shufflevector support
llvm-svn: 27515
2006-04-08 01:19:47 +00:00
Evan Cheng
37b4263eb8 Add code to RemapOperand() to handle Instruction::ExtractElement and
Instruction::InsertElement.

llvm-svn: 27477
2006-04-07 01:27:42 +00:00
Chris Lattner
2cbee3afee Rename method
llvm-svn: 25571
2006-01-24 04:14:29 +00:00
Chris Lattner
0af0dbcfa5 Add support for linking inline asm
llvm-svn: 25560
2006-01-23 23:08:37 +00:00
Chris Lattner
3158146649 add support for ConstantPacked to the linker
llvm-svn: 25467
2006-01-19 23:15:58 +00:00
John Criswell
e7062e0703 Fixed style of curly brace. No functionality changes.
llvm-svn: 25414
2006-01-17 22:01:57 +00:00
Reid Spencer
783084211a For PR521:
With these patches we implement the ability for the Linker library to
keep track of which libraries were actually bytecode files (not archives)
and cause their users to remove such files from the list of libraries to
pass to the native linker.

llvm-svn: 25169
2006-01-10 03:14:40 +00:00
Reid Spencer
e7b44b171a Be a little more explanatory in a comment.
llvm-svn: 25168
2006-01-10 03:12:29 +00:00
Reid Spencer
2b33292a67 Adjust the constructor to the Linker class to take an argument that names
the module being constructed. This is used to correctly name the module.
Previously the name of the linker tool was used which produces confusing
output when the module identifier is used in an error message.

llvm-svn: 24699
2005-12-13 20:00:37 +00:00
Chris Lattner
b3a66217a4 Fix test/Regression/Linker/2005-12-06-AppendingZeroLengthArrays.ll and
PR662.  Thanks to Markus for providing me with a ton of files to
reproduce the problem!

llvm-svn: 24619
2005-12-06 17:30:58 +00:00
Chris Lattner
e6f7a38925 DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now
llvm-svn: 23940
2005-10-24 02:26:13 +00:00
Reid Spencer
5534b2d505 For PR495:
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:

appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set

Changes pass Dejagnu and llvm-test/SingleSource tests.

llvm-svn: 22349
2005-07-07 23:21:43 +00:00
Reid Spencer
fb7bca6fa6 For PR495:
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute

More (incremental) changes coming to close 495.

llvm-svn: 22345
2005-07-07 18:21:42 +00:00
Chris Lattner
a2edd7e449 Preserve CC's when linking modules
llvm-svn: 21799
2005-05-09 01:09:39 +00:00
Misha Brukman
933cdaf254 Remove trailing whitespace
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Chris Lattner
f174f4c9d1 fix some 80 column violations
Add support for programs that define main in a .a file, such as f2c'd programs.

llvm-svn: 20631
2005-03-15 23:03:34 +00:00
Chris Lattner
1020a03b64 consolidate LinkFiles into LinkItems, use lib_* iterators.
llvm-svn: 20630
2005-03-15 22:55:17 +00:00
Chris Lattner
60222ca193 consolidate LinkLibraries into LinkItems
llvm-svn: 20629
2005-03-15 22:51:40 +00:00
Chris Lattner
4b688a1c70 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!

llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner
15759af51d Add support for ".so" files compiled with LLVM which contain LLVM bytecode.
llvm-svn: 20253
2005-02-19 18:30:29 +00:00
Chris Lattner
042a54de90 Eliminate silly warnings from the linker of the form:
WARNING: Type conflict between types named 'union.._604.'.
    Src=' %union.._604.'.
   Dest=' %union.._604.'
llvm-svn: 20252
2005-02-19 17:52:37 +00:00
Chris Lattner
1194167daa Minor cleanup. No need to explicitly tell the compiler the template arguments.
llvm-svn: 20153
2005-02-13 17:50:16 +00:00
Chris Lattner
da614a0e0b Print something useful for gccld -v with an archive.
llvm-svn: 20148
2005-02-13 15:26:14 +00:00
Chris Lattner
6e3279c0b4 Allow globals to be of different const'nesses when we link.
This finally resolves PR502, PR450,
and test/Regression/Linker/2005-02-12-ConstantGlobals{,-2}.ll correctly

llvm-svn: 20135
2005-02-12 19:20:28 +00:00
Reid Spencer
68f4d407fc Remove un-needed #includes.
llvm-svn: 19061
2004-12-20 04:15:44 +00:00
Reid Spencer
8b758b07c4 Fix a compile error. config.h is now needed because DataTypes.h doesn't
include it any more.

llvm-svn: 18993
2004-12-16 19:19:24 +00:00
Reid Spencer
cc77c7abb5 * Fix header block.
* Fix loop style per standards
* Don't create a new Module when the Linker's module is released.
* Add/fix function comments.

llvm-svn: 18871
2004-12-13 03:50:50 +00:00
Reid Spencer
7df034022a Add missing space in a comment.
llvm-svn: 18870
2004-12-13 03:23:13 +00:00
Reid Spencer
57575286ec Fix header and function comments.
llvm-svn: 18867
2004-12-13 03:13:18 +00:00
Reid Spencer
ed05e1fa02 This file contains basic Linker facilities needed by all tools
llvm-svn: 18860
2004-12-13 03:00:28 +00:00
Reid Spencer
94a27a253c Make LinkModules a static member function
llvm-svn: 18859
2004-12-13 03:00:16 +00:00
Reid Spencer
24726c4a89 This file contains only the Linker's library linking support
llvm-svn: 18858
2004-12-13 03:00:04 +00:00
Reid Spencer
f10f056fe4 For PR351: \
* Remove redundant static function LinkOneLibrary. \
* Remove unneded #includes \
* Convert FileSupport usage to sys::Path instead

llvm-svn: 18857
2004-12-13 02:59:52 +00:00
Reid Spencer
e7d544a97d This file contains only the Linker's file linking support
llvm-svn: 18856
2004-12-13 02:59:41 +00:00
Reid Spencer
9d9fc4e4ec For PR351: \
* Convert functions to Linker:: methods. \
* Remove unneeded #includes \
* Utilize sys::Path utilities not FileSupport utilities \
* Move File & Library linking functions to other source files

llvm-svn: 18855
2004-12-13 02:59:29 +00:00
Chris Lattner
3c31189583 Make sure to link the target-triple as well, so it ends up in the .llvm.bc file
llvm-svn: 18774
2004-12-10 20:26:15 +00:00
Chris Lattner
0cfaa02448 Turn this error back into a warning, fixing the povray regression
llvm-svn: 18655
2004-12-08 20:01:10 +00:00
Chris Lattner
722af6cfde Revert this disgusting hack, John has a much nicer solution
llvm-svn: 18611
2004-12-08 03:31:14 +00:00
Chris Lattner
ad4056c178 Add a disgusting hack to work around a libstdc++ issue. This code should
be removed when PR400 is resolved.

llvm-svn: 18610
2004-12-08 03:28:51 +00:00
Reid Spencer
98eb4c8d05 Fix PR139: \
Implement LinkItems and BuildLinkItems interfaces.

llvm-svn: 18547
2004-12-05 19:14:55 +00:00
Chris Lattner
32d0c4ce02 Fix linkage of mismatched weak globals. This unbreaks 300.twolf
llvm-svn: 18494
2004-12-04 18:54:48 +00:00
Chris Lattner
5d27646680 Significantly rework linker support for global variables, allowing it to
correctly link globals whose LLVM types do not match.

This fixes several of the F2C SPEC FP benchmarks, which were failing this
due to the implementation of common blocks used by f2c.

llvm-svn: 18465
2004-12-03 22:18:41 +00:00
Reid Spencer
356384fbdb PR466:
* Make the linker find lib*.bca files now instead of lib*.bc since those
  are what the makefiles now generate for bytecode archives.
* Make sure the linker only links archives when LinkLibraries is called.
  Previously if it found a lib*.bc file and that file was a bytecode file,
  it would link in the entire bytecode. This could make -lc -lc fail with
  duplicate symbols error but it shouldn't as searching multiple libraries,
  even the same one more than once, is permitted.
* Now that the above problems are corrected, implement the dependent libs
  feature. After the module is linked with all specified libraries, the
  LinkLibraries function will obtain the set of dependent libraries from
  the linked modules and attemp to find and link against those libraries.

llvm-svn: 18428
2004-12-02 09:52:10 +00:00
Reid Spencer
af68e19395 Revert version 1.39. It breaks the ordering of the library processing.
llvm-svn: 18399
2004-11-30 22:54:48 +00:00
Reid Spencer
e76c012f3a Shared library extension is now in LTDL_SHLIB_EXT
llvm-svn: 18353
2004-11-29 12:40:21 +00:00
Reid Spencer
8cf334425d Implement dependent library linking. It is no longer required that -lstdc++
-lstdsup++ no -lc be passed on the command line to llvm linkers if the
progam being linked was compiled with the C/C++ Front End or Stacker.

llvm-svn: 18243
2004-11-25 09:32:08 +00:00
Reid Spencer
c7b5efd4b9 Remove blank comment lines for uniformity.
Make sure lines don't exceed 80 cols.

llvm-svn: 18242
2004-11-25 09:29:44 +00:00
Reid Spencer
fb0e585554 Eliminate unsightly ;;
llvm-svn: 17979
2004-11-19 03:27:05 +00:00
Reid Spencer
119f824e80 Reduce the amount of work in LinkInArchive by not searching the archive for
symbols it has already identified as not defining.

llvm-svn: 17975
2004-11-19 03:13:25 +00:00
Chris Lattner
8906663505 Don't increment a dead iterator
llvm-svn: 17904
2004-11-16 19:04:40 +00:00
Chris Lattner
b40f8214ea Simplify the remapper by only needing one map, since the body of the functions
being linked do not need to be remapped any longer.

llvm-svn: 17900
2004-11-16 17:12:38 +00:00
Chris Lattner
0493754bcf Take advantage of the fact that we are allowed to clobber the input module
by splicing function bodies from the src module to the destination module.

This speeds up linking quite a bit, e.g. gccld time on 176.gcc from 26s -> 20s
when forming the .rbc file, with a profile build.  One of the really strange
but cool effects of this patch is that it speeds up the optimizers as well,
from 12s -> 10.7s, presumably because of better locality???

In any case, this is just a first step.  We can trivially get rid of the
LocalMap now and do other simplifications.

llvm-svn: 17893
2004-11-16 07:31:51 +00:00
Reid Spencer
ddfafa643a Per code review:\
* Adjust indentation\
* Ensure memory do not leak if exceptions happen (std::auto_ptr use)

llvm-svn: 17885
2004-11-16 06:47:41 +00:00
Chris Lattner
be4c91f75f The second arg may be clobbered by this function
llvm-svn: 17880
2004-11-16 06:41:36 +00:00
Chris Lattner
e816a3abc2 use an autoptr
llvm-svn: 17875
2004-11-16 06:40:54 +00:00
Reid Spencer
29eb55846f Remove a forgotten debug output line.
llvm-svn: 17810
2004-11-14 23:49:55 +00:00
Reid Spencer
7850852268 Linker.h moved to include/llvm from include/llvm/Support.
llvm-svn: 17807
2004-11-14 23:27:04 +00:00
Reid Spencer
7a004d2749 Linker.h has a new home.
llvm-svn: 17801
2004-11-14 23:00:08 +00:00
Reid Spencer
292678447a Don't bother with a re-linked library, ensure archive library is built.
llvm-svn: 17773
2004-11-14 22:03:14 +00:00
Reid Spencer
8a2a29e286 *Adjust prototypes for public interface. *Rewrite LinkInArchive to use symbol tables.
llvm-svn: 17772
2004-11-14 22:02:27 +00:00
Reid Spencer
f6caf3b1c2 Makefile for lib/Linker
llvm-svn: 17695
2004-11-12 20:38:45 +00:00
Reid Spencer
f755c169b3 This file originated in lib/VMCore/Linker.cpp but now lives in
lib/Linker/LinkModules.cpp

llvm-svn: 17694
2004-11-12 20:37:43 +00:00
Reid Spencer
13a6af95ad This file originated in tools/gccld/Linker.cpp but now lives in
lib/Linker/LinkArchives.cpp

llvm-svn: 17693
2004-11-12 20:34:32 +00:00