Commit Graph

777 Commits

Author SHA1 Message Date
John Criswell
aa2a47d813 Added the -h option for compatibility with other linkers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10335 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-09 15:39:11 +00:00
Chris Lattner
de9750def7 Bugpoint had appalingly bad grammar. Fix some of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10308 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 02:43:09 +00:00
Chris Lattner
1b747167da Do not leave a bunch of crud lying around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10307 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 02:31:03 +00:00
Chris Lattner
1dcf7bc6a9 It is now after pldi. This issue has been fixed, so remove the hack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 01:44:18 +00:00
Tanya Lattner
57bd796604 New command line parsing. This isn't as perfect as I would have liked. The CommandLine Library needs to be extended, in order to parse the options and allow for optional dashes. In addition, the help option isn't correct since I do the parsing mostly myself. But this is in the ocorrect ar format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10297 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-06 23:01:25 +00:00
Chris Lattner
043b9722f5 be 3.4 happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10265 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 20:04:13 +00:00
Chris Lattner
9e6f686559 Fix compatibility with gcc 3.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 19:45:47 +00:00
Chris Lattner
548e813fa7 The function resolving pass must be run, even if -disable-opt is specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10250 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 09:44:03 +00:00
Chris Lattner
6cc8ca9229 * The return value of LinkLibraries is ignored, so remove it.
* Finegrainify namespacification of Linker.cpp
* If linking a library in fails, do not STOP LINKING IN LIBRARIES AND
  CONTINUE ANYWAY!  Instead, just output the warning, and keep going. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10249 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 07:44:09 +00:00
Misha Brukman
0d2459a49f I'm gonna be picky and say we don't really need that trailing slash "lib/"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10196 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:31:57 +00:00
Misha Brukman
3e15c7a976 Make sure we ONLY add a `-load' switch to the JIT command line if the file is
verified as having an ELF header. This fixes PR151.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10195 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:29:42 +00:00
Chris Lattner
c6b519d64e Do not DESTROY programs by default. No wonder bugpoint was not being useful all this time!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10175 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-23 04:51:05 +00:00
Chris Lattner
3edb77c07e Revert the previous patch since it causes lots of miscompilations. :( :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10172 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-22 19:07:47 +00:00
Chris Lattner
8bc098be0c Do not crash when dealing with invoke and unwind instructions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10160 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-22 02:10:38 +00:00
Chris Lattner
89eca9097d Use new interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10159 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-22 02:10:26 +00:00
Chris Lattner
14b170f5ff Reorder passes a bit. In particular, it makes sense to run globaldce IMMEDIATELY after funcresolve. Also, run the mem2reg pass _early_ so that IPCP and DAE actually do stuff.
Run instcombine and simplify cfg after this to cleanup the intraprocedural messes we create.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10134 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 21:44:35 +00:00
Misha Brukman
3e25f2e1be When writing out the runner script, add -load=<lib> lines to pull in all the
shared objects automagically, so it doesn't have to be done by hand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10114 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 19:08:42 +00:00
Misha Brukman
84fbc653ce Add ability to search only for native shared object, and expose the
functionality to the rest of gccld.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10113 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 19:08:06 +00:00
Misha Brukman
438e364692 For consistency, removed space between function name and left paren in function
call, i.e. [ addPass (...) ]  =>  [ addPass(...) ]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10105 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 06:26:15 +00:00
Misha Brukman
9839969110 * Doxygenified comments, simplifying them and shortening in the process
* Eliminated extra space


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10104 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 06:21:54 +00:00
Brian Gaeke
8b1daa3e71 Unbreak the "-" as filename hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10099 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-19 22:15:00 +00:00
Brian Gaeke
820428711f Also print an error msg. for files we cannot currently deal with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10097 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-19 21:57:30 +00:00
Brian Gaeke
08d03c79a2 Fix PR134, by checking FileOpenable() on each input file before analyzing its
type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10096 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-19 21:52:09 +00:00
Brian Gaeke
c8db76c647 Only use -Wl,-R. if HAVE_LINK_R.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10066 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-18 06:31:17 +00:00
Brian Gaeke
1c0b6982d2 Include Support/FileUtilities.h.
Print module identifier in DumpSymbolNamesFromModule().
In DumpSymbolNamesFromFile(), check whether it is an archive or a bytecode
 file, and call the corresponding reader function (ParseBytecodeFile or
 ReadArchiveFile).
Unconditionally set MultipleFiles for archives.
Fixes PR117.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10044 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:34:13 +00:00
Brian Gaeke
1ab90d4e38 Add a -verify option to verify the results of gccld passes.
Add a -disable-opt option to turn off gccld optimization passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10040 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:07:28 +00:00
Brian Gaeke
2282ae1ebd When we find a module we want, in an archive, in verbose mode,
print out the module's identifier (which should now contain the name
 of both the archive and the module.)
Wrap some lines at 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10039 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:07:13 +00:00
Chris Lattner
a8d76d4bde As the comments indicate, this is a temporary, repulsive, hack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9982 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 19:26:54 +00:00
Chris Lattner
6a45da0de6 Restore the -llvm option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9915 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 04:59:59 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Brian Gaeke
0d723acf15 Move IsArchive, IsBytecode to FileUtilities. Fix up some method comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9902 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 21:54:01 +00:00
Misha Brukman
aab9ca73fd 'Tis quite silly to check for a cached version of the entire executable. That
amounts to checking for a completely-native version. We'll cache on a
function-by-function basis instead (in the JIT's CodeEmitter).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9894 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:38:56 +00:00
Brian Gaeke
ee8adb1955 This version of Linker.cpp works a lot better, but it's a little messy. Sorry.
Use FileOpenable() instead of FileExists().
Create IsBytecode() predicate -- like IsArchive(), but for bytecode files.
Use IsBytecode() before trying to load any file as a bytecode file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9893 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:27:37 +00:00
Misha Brukman
fa33a13232 The caching will not live in LLEE's execve() handler; that's suboptimal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9890 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:23:09 +00:00
Chris Lattner
cc650b615d Give gccld more guts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9835 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 19:55:09 +00:00
Chris Lattner
cde1cf3f9d Add new command line option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9754 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-06 20:29:25 +00:00
Brian Gaeke
aee4de9957 Give this header file an Emacs mode-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9749 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:13:10 +00:00
Brian Gaeke
00cc86a8fc Do not assume the first file is a bytecode file. Instead, construct a dummy
Module and link things into that.

Also, fix a typo in an error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9748 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:13:00 +00:00
Brian Gaeke
3b3640a373 Shorten and correct some function-header comments.
Make "verbose" output MUCH nicer. Now it tells you when you are linking a
bytecode file, or an archive, and whether it's because you called it by name,
or because you gave it a -l option, and it says "Trying" before it takes
action and prints a message in the past tense afterwards.

Make LinkFiles not skip the first file in Files.

Make LinkFiles warn you if it can't find a file and LLVM_LIB_SEARCH_PATH is
unset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9747 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:12:52 +00:00
Chris Lattner
fcb6ec0c7e I hate it when bugpoint is all ready to give me a bytecode file, then crashes
in final cleanups.  Then you had to run the whole mess again with
-disable-final-cleanups.

This makes bugpoint run the cleanups in a protected environment so that if
they crash, bugpoint itself doesn't crash.  This makes things much happier,
implements a FIXME, and gets rid of YABPO (yet another bugpoint option).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9743 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 21:45:35 +00:00
Chris Lattner
417477d6c2 Simplify the performFinalCleanups interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9740 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 21:15:19 +00:00
Chris Lattner
fe32bf5d0d Make -r work, fixing PR 91
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9724 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 06:05:21 +00:00
Chris Lattner
fd35c6417d If linking a library, do not link other libraries, like libc, into it!
This fixes lots of annoying warnings and error messages


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9677 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 17:27:17 +00:00
Chris Lattner
9088de7357 never print zero executions blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9626 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 00:34:05 +00:00
Chris Lattner
3b7f41631d Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9625 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 00:20:09 +00:00
Chris Lattner
e1ccadf58c Add percentage info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9624 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 00:13:26 +00:00
Chris Lattner
3baed41672 Hrm, some of my counters are wrapping around 32 bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9623 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 00:06:57 +00:00
Chris Lattner
367373053b If only have function profile, don't print out "not executed" for all of the blocks :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9622 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:44:28 +00:00
Chris Lattner
5e717646d7 Add the ability to print out llvm code when the -annotated-llvm option is given
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9621 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:42:09 +00:00
Chris Lattner
750ba3d6eb Add the ability to synthesize function counts from block count information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9595 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 21:47:44 +00:00