Commit Graph

576 Commits

Author SHA1 Message Date
Brian Gaeke
69a79600cb gccld.cpp:
Fix typo in header.
 Add IsArchive static method.
 Roll LoadLibraryFromDirectory() into LoadLibrary(), and factor
  LoadLibraryExactName() out of the result. Instead of treating the current
  directory specially, just insert it into LibPaths in the beginning of
  main().
 Make LoadLibrary() take a "search" flag that says whether to search for the
  correct library, or just trust that LibName is right.
 Make LinkLibrary() take a "search" flag, and pass it to LoadLibrary().
 Change the for-loop over InputFilenames to detect ar archives and link them
  in as libraries without searching.
 Change the for-loop over Libraries to explicitly turn on the "search" flag
  to LinkLibrary() that makes LoadLibrary() search for the correct library
  (i.e., when processing -lNAME options.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6316 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-23 20:27:07 +00:00
Brian Gaeke
dae7f92366 Clarify BugDriver.cpp:BugDriver::ParseInputFile()'s return values in its
explanatory comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6308 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-23 05:34:32 +00:00
Chris Lattner
6c8103f7dd Kill using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6292 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 20:13:16 +00:00
Chris Lattner
dbe48dcaec Allow disabling final cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6271 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 20:38:59 +00:00
Chris Lattner
28b8ed90c7 Increase odds that this won't bork things
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6267 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 19:41:31 +00:00
Chris Lattner
9148ec65c2 Get rid of really old makefile cruft
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6218 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-14 21:31:31 +00:00
Chris Lattner
7cb77e188f Search LLVM_LIB_SEARCH_PATH for objects to allow it to find crtend.o
Implement minor library linking optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6181 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-13 22:14:13 +00:00
Chris Lattner
59039a926d Add a disable-verify option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6155 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 22:12:44 +00:00
Chris Lattner
0b43f4ef29 Move static stuff to an anonymous namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6154 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 22:08:58 +00:00
Chris Lattner
3cbacc9047 Print filename correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6119 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:32:04 +00:00
Chris Lattner
19669f37b0 The JIT is the default mode for LLI now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6118 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:31:57 +00:00
Chris Lattner
f479be58f5 Make a comment more accurate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5991 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 03:20:36 +00:00
Chris Lattner
cc876a7421 Add support for debugging miscompilations with the use of the JIT or CBE!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5990 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 03:19:41 +00:00
Chris Lattner
fb74224662 Bugpoint is always verbose, eliminate option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5989 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 03:18:41 +00:00
Misha Brukman
c8b27318a3 The Grammar Police is out on patrol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5985 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 02:16:43 +00:00
Chris Lattner
590607b01c Add an instcombine pass before levelraise
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5980 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-02 18:19:05 +00:00
Chris Lattner
68492725a0 Add a new option to disable stripping of bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5969 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-28 03:28:56 +00:00
Chris Lattner
10daaa1416 Remove two fields from TargetData which are target specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5963 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-26 20:11:09 +00:00
Chris Lattner
6db70ef879 Add options to disable simplification with passes, in case one of them crashes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5950 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 22:08:12 +00:00
Chris Lattner
bc19466912 Make sure to copy double alignment as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5936 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 06:06:13 +00:00
Chris Lattner
b5881f126d Kill using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5934 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 05:26:11 +00:00
Chris Lattner
2b5f2c1a64 Make sure to add a targetdata instance to the passmanager, and make it match the
one in use by the TargetMachine


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5931 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 05:22:29 +00:00
Chris Lattner
0c13998775 Rename Kept -> Suffix
FIX problem where we were incorrectly putting the prefix of the list into the "suffix" list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5926 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 03:16:33 +00:00
Chris Lattner
06943add8b Rename Kept -> Suffix
Fix problem where we accidentally returned KeepPrefix instead of KeepSuffix!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5925 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 03:16:05 +00:00
Chris Lattner
5f73e38548 Big programs have tons of global variable initializers, and most passes don't care
about them.  Try to delete them if it doesn't affect the passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5918 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 00:53:05 +00:00
Chris Lattner
16608b4c85 When cleaning up the final bytecode file, make sure to run DTE as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5917 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 00:52:30 +00:00
Chris Lattner
286921e8d2 Speed up convergence significantly and also reduce the size of testcases by making large portions of a function's CFG dead at a time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5915 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 23:51:38 +00:00
Chris Lattner
f607b79bc7 The big fix is this change:
-    if (I->isExternal() && !Functions.count(I))
+    if (!I->isExternal() && !Functions.count(I))

We were not actually deleting any functions from the module!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5914 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:54:06 +00:00
Chris Lattner
44be257166 Remove dead functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5913 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:53:24 +00:00
Chris Lattner
473a843f31 Make sure that deleted functions have external linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5912 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:53:01 +00:00
Chris Lattner
aae33f9137 Use the list reducer to improve convergence speed and to support crashes that
only occur when multiple passes interact or when multiple functions exist in a module


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5911 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:24:58 +00:00
Chris Lattner
39aebca3a2 Adjust to match new ListReducer interface
Move function to generic code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5910 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:24:22 +00:00
Chris Lattner
b4ebe13643 Allow reducer interfaces to mutate the lists passed in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5909 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:23:56 +00:00
Chris Lattner
ff4aaf0010 Move function from Miscompilation.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5908 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:23:34 +00:00
Chris Lattner
126840f49e Move the ListReducer Class into it's own header file instead of living in Miscompilation.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5907 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 20:16:29 +00:00
Chris Lattner
a148ccb158 Allow bugpoint to try new an different methods for pruning down lists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5905 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 19:32:42 +00:00
Chris Lattner
9c3b55ea9f Make sure to create a target data that matches the Module's target properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5904 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 19:13:02 +00:00
Chris Lattner
c986392c30 Remove support for "target data" pass ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5900 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 18:36:41 +00:00
Chris Lattner
961f7b4e4f LevelRaise now gets target data from passmanager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5898 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 18:26:03 +00:00
Chris Lattner
640f22e66d Implement support for bugpoint to identify which FUNCTION an optimization
is miscompiling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5893 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 17:02:17 +00:00
Chris Lattner
eea21dd91c Print where reference output goes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5891 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 20:41:18 +00:00
Chris Lattner
a4dd4e2de8 The new CFrontend generates LOTs of basic blocks that just fall through and do
other funky stuff.  Clean it up early.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5889 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 20:40:42 +00:00
Chris Lattner
3c053a0a98 Allow specifying an input file for the program being executed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5888 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 20:31:37 +00:00
Chris Lattner
cf31784c69 We now need to link libscalar to get the switch lowering pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5874 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:43:02 +00:00
Chris Lattner
6e96a99ce3 Remove unnecessary &*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5873 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:38:00 +00:00
Chris Lattner
e0b235cd97 Build the appropriate target machine for the input pointer size and endianness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5838 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 18:10:32 +00:00
Chris Lattner
d34a51dbbe Add support for allowing the user to extend the GCCLD searchpath
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5825 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 19:53:24 +00:00
Chris Lattner
c65b104309 Eliminate useless duplicate libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5823 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-19 23:07:33 +00:00
Chris Lattner
10970eb05f Add first support for linking in .a files correctly and minimally, like a real linker does
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5822 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-19 22:44:38 +00:00
Chris Lattner
a856db22fa Add crufty compatibility stuff for ld
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5813 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 23:38:22 +00:00
Chris Lattner
e1c8153d63 Eliminate some compatibility stuff no longer needed :P
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5812 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 23:38:09 +00:00
Chris Lattner
f3d4f178b2 Use anonymous namespace instead of "static"
Kill using decl


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5811 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 23:01:25 +00:00
Chris Lattner
0af1e8e3a4 Don't support codegen passes in opt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5797 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 23:02:16 +00:00
Chris Lattner
f5653226b5 Remove codegen libraries to speed up linking opt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5796 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 22:55:55 +00:00
Chris Lattner
dabaa46c66 Allow the user to disable the internalize pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5792 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 21:43:22 +00:00
Chris Lattner
56620da5b4 Give verbose error messages if bytecode file cannot be parsed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5789 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 20:51:36 +00:00
Chris Lattner
8c7b0551f4 Improve compatibility with system AS further by allowing input from stdin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5780 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 17:49:18 +00:00
Chris Lattner
2c1d2f21fd * Get rid of using declaration
* Add two compatibility options to work better with new GCC frontend


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5779 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 17:41:08 +00:00
Chris Lattner
f2956fcc11 Namespacify command line options
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5778 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 17:34:29 +00:00
Chris Lattner
0e08e1beda Minor tweak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5758 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-31 17:30:35 +00:00
Chris Lattner
10f22cb1a0 Make sure that intermediate code is verifier clean to avoid wierd problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5723 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-07 18:17:13 +00:00
Chris Lattner
ba386d943f * Reduce the number of useless bytecode files produced by bugpoint.
- This also speeds it up as the bytecode writer isn't terribly fast.
* Add a new cleanup pass after everything else to run -funcresolve -globaldce


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5668 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-28 16:13:20 +00:00
Chris Lattner
ddd5b417c6 Rename -no-* to -disable-*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 20:00:41 +00:00
Chris Lattner
22a3b55406 Make printing messages nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5616 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-24 20:07:54 +00:00
Chris Lattner
f3bafc1043 Add new -no-verify option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-12 18:45:08 +00:00
Chris Lattner
d70b68ebd0 Add a new -no-output option, useful for -aa-eval tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5541 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-12 18:43:33 +00:00
Chris Lattner
3301b695cb Fix build problem on sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5428 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-29 18:15:34 +00:00
Chris Lattner
6520785dcd Make bugpoint *much* more powerful, giving it the capability to delete instructions
out of a large function to reduce it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5408 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-23 02:48:33 +00:00
Chris Lattner
f2bcccfbab Allow creating of passes like levelraise which use a targetdata ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5403 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-22 23:24:11 +00:00
Chris Lattner
cabda2134e link with static versions of some libs to avoid having to pull in all of ipo/ipa and datastructure at all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5402 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-22 22:14:04 +00:00
Chris Lattner
285ca5ed2f Fix didn't fix the race condition in the makefiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5394 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-22 15:41:10 +00:00
Chris Lattner
c479db964f Fix race condition in Makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5380 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-21 15:20:50 +00:00
Chris Lattner
784fac874c * Prune down library list. In particular, llc doesn't need all of IPO, and none of data structure and IPA completely!
* Do not keep symbols by default!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5375 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-19 21:55:43 +00:00
Chris Lattner
6ede045533 Rename header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5283 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:57:15 +00:00
Chris Lattner
66de1893bc Link in lots o libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5269 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 21:30:30 +00:00
Chris Lattner
0394891ef6 No longer need scalaropts lib
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5252 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:58:18 +00:00
Chris Lattner
c93489bf87 Eliminate direct access to TargetData structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5156 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:00:00 +00:00
Chris Lattner
e1b52b7656 Fix compilation on GCC 3.2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5136 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-24 00:44:34 +00:00
Chris Lattner
4fcfc12dab Don't try to buidl jello
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5135 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-24 00:44:26 +00:00
Chris Lattner
d6840ac046 Fixes to compile with GCC 3.2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5134 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-24 00:39:16 +00:00
Chris Lattner
a3b58e8e1b Jello is now part of LLI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5133 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-24 00:14:25 +00:00
Chris Lattner
fe11a97fcd Substantial changes to refactor LLI to incorporate both the Jello JIT and
the traditional LLI interpreter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5125 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-23 23:59:41 +00:00
Chris Lattner
b76d4965c1 X86 target machine is now parameterizable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5124 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-23 23:55:01 +00:00
Chris Lattner
4a10645c70 New files for miscompilation detection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5120 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-23 23:50:16 +00:00
Chris Lattner
218e26ef35 Implement the start of the miscompilation detection stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5119 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-23 23:49:59 +00:00
Brian Gaeke
5c1f0f6914 brg
Add statistic for number of bytes of data area initialized.
We used this statistic in collecting data for the paper, but I forgot
to commit it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5112 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-22 18:53:23 +00:00
Chris Lattner
debb5ee6c0 Make stuff compiled with gccld not dump into the debugger if there's a problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5028 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-14 21:28:32 +00:00
Chris Lattner
041b31ce69 Pass command line arguments to main
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5027 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 16:48:57 +00:00
Chris Lattner
395a8821bf Add statistic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5026 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 15:28:42 +00:00
Misha Brukman
e4bdfa6353 Made status output debug-only (for testing diffs against lli).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5022 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 13:15:36 +00:00
Brian Gaeke
e48ec018a5 brg
InstSelectSimple.cpp: Add stub implementation of visitFreeInst.
 Add comments that mention how we are failing to implement malloc/free.
 Add initial implementation of visitAllocaInst.

X86TargetMachine.cpp: Include llvm/Transforms/Scalar.h.
 Add LowerAllocations pass before instruction selection.

jello/Makefile: Add scalaropts.a.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4994 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 06:46:31 +00:00
Chris Lattner
4c95e56743 Implement branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4988 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 05:40:28 +00:00
Brian Gaeke
20244b7e2c This checkin is brought to you by the brian gaeke allnighter fund.
(lib/Target/X86) InstSelectSimple.cpp:
 Include llvm/DerivedTypes.h and iostream.
 Refactor visitMul out into a wrapper around doMultiply(), so that we
  can do multiplications on temporary values when we are doing
  getelementptrs.
 Refactor part of getReg out into makeAnotherReg, so that we can create
  registers willy-nilly to hold temporary values, when we are doing
  getelementptrs.
 Add stub implementations of visitMallocInst and visitAllocaInst.
 Add initial implementation of visitGetElementPtrInst.
 In copyConstantToRegister:
  We throw a *lot* of our asserts here. So, when we want to throw an
   assert, print out to stderr whatever expr or whatever constant made
   us barf.
  Support copying ConstantPointerNull to register, using a move immediate
   of zero.
 Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings
  of the numbers in the other instruction names. All uses modified.
 Teach visitCallInst to extract byte- and short-class return values
  from subregs of EAX.  Add a FIXME note about how we would do it for
  float-class return values.
 Add a FIXME note about how we would cast float to int and back.

X86InstrInfo.def:
 Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings
  of the numbers in the other instruction names. All uses modified.

(tools/jello) GlobalVars.cpp:
 Include iostream.
 If we have to emit a floating-point constant to memory, gamble and use
  the same method as for ints.
 If we have to emit a ConstantPointerNull to memory, try using a "void *"
  and "NULL".
 Otherwise, if we are going to throw an assert, print out whatever constant
  made us barf, first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4973 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-12 15:33:40 +00:00
Misha Brukman
6a4a4cd837 ipa.a only needs to be mentioned once, and spaces should be used instead of
tabs for readability.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4970 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-12 05:29:32 +00:00
Vikram S. Adve
3dbbaff5ec Fix link errors due to new IPModRef pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4960 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-09 05:53:11 +00:00
Vikram S. Adve
027b27e5b9 Repeat ipa.a. Since IPModRef is currently only used in analysis.o,
it was causing linking errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4959 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-09 04:46:25 +00:00
Chris Lattner
bbdabce1e9 Add support to count the number of dynamic instructions executed by LLI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4955 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-08 05:51:08 +00:00
Chris Lattner
698e9ce568 Only build jello when compiling on X86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4938 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06 03:53:40 +00:00
Chris Lattner
5d7a579842 Fix to make jello compile on Sparc even though it won't run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4937 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06 03:52:51 +00:00
Chris Lattner
42aa3ae90b Add support for global value references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4908 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 06:45:40 +00:00
Chris Lattner
398b2f43ff Initial checkin of global var support code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4904 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 06:09:04 +00:00
Chris Lattner
b3bbffe7fa Implement simple global variable support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4903 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 06:04:17 +00:00
Chris Lattner
75a213dbe8 Implement external function support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4902 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 06:04:07 +00:00
Chris Lattner
41db76dec2 Initial checkin of Unresolved function fault handler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4900 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 05:05:26 +00:00
Chris Lattner
d6c10ea817 Implement lazy resolution of function calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4899 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 04:47:34 +00:00
Chris Lattner
6710121b6b Initial checkin of virtual machine implementation.
We can now run very trivial test cases


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4894 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 22:48:59 +00:00
Chris Lattner
9ec736860a Disable timing of bytecode loader
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4887 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 19:42:26 +00:00
Chris Lattner
3e80f7d9ce Final tweak to printer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4881 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 06:33:30 +00:00
Chris Lattner
ffe6eac6a2 Implement trivially simple debugger for MachineCodeEmitter interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4880 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 06:09:26 +00:00
Chris Lattner
18a171f34c Add initial support for machine code emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4865 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:22:04 +00:00
Chris Lattner
21049cf266 Build bugpoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4790 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 22:28:18 +00:00
Chris Lattner
afade9294a Initial checkin of bugpoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4789 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 22:28:10 +00:00
Chris Lattner
5113eb0c52 Move the function extractor pass from tools/extract into lib/Xform/IPO
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4759 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 18:42:59 +00:00
Chris Lattner
2181c0112f Remove extra target.a entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4756 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 16:59:41 +00:00
Chris Lattner
49d9a88428 Add a timer to evaluate bytecode load time and space requirements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4679 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 06:55:02 +00:00
Vikram S. Adve
8aa5aeab84 Don't build llc symbols by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4565 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 16:10:57 +00:00
Chris Lattner
6d37acb052 Give passnames to the printer classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4559 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 06:16:08 +00:00
Chris Lattner
c9d8beff59 No need to explicitly inclue ExportSymbols now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4543 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 20:50:57 +00:00
Vikram S. Adve
c405daf392 Simple passes that print out SCCs in the CFGs or in the CallGraph of a module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4532 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 14:20:22 +00:00
Chris Lattner
f74825436c Implement a new -print-callgraph analysis that turns a callgraph into a dot
graph


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4524 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 02:55:30 +00:00
Vikram S. Adve
02a74ccd61 Disable correlated expressions pass until it is reliable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4512 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-03 12:41:50 +00:00
Chris Lattner
52af630b24 Reassociate now works
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4472 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 17:13:11 +00:00
Misha Brukman
b246cee5fb Return 0 instead of 1 for correct execution. Makes automated testing happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4449 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 02:18:29 +00:00
Chris Lattner
a22026a665 Jello now builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4430 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:41:11 +00:00
Chris Lattner
ab0aa7ff99 * Privatize the TargetName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4418 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:48:33 +00:00
Chris Lattner
6334205cb5 Allow TargetMachine to refuse static code gen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4415 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:12:46 +00:00
Chris Lattner
083ee69349 Convert jello to use PassManager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4414 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:06:58 +00:00
Chris Lattner
6560b6b101 Rename Sparc.h TargetMachineImpls.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4409 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:48:09 +00:00
Chris Lattner
4aba5e34a1 * Remove explicit strcmp calls
* Rename Sparc.h to TargetMachineImpls.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4406 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:45:04 +00:00
Chris Lattner
e05c8fd5dd After removing stuff from TargetMachine, we now no longer have to include
it twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4311 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:13:07 +00:00
Chris Lattner
d08e9fd389 Add codegen library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4305 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:54:59 +00:00
Chris Lattner
ddb1212d89 Initial checkin of LLVM JIT, codenamed jello. This tool is not built by
default, until it becomes stable.  Even then it will only work for for X86
targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4285 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 22:58:53 +00:00
Vikram S. Adve
c954161ea7 Added datastructure library to resolve link error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4279 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 21:17:34 +00:00
Chris Lattner
68ed318d33 * Fix extract to work with constant pointer refs correctly
* Extract makes all global vars external, so they don't have initializers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4121 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-12 20:50:16 +00:00
Chris Lattner
ac859db3e4 - Implement a new -print-cfg option for analyze, that causes it to print the
CFG of each function in the module to 'dot' files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4062 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-07 18:38:01 +00:00
Chris Lattner
71bcba7d1a Avoid making external global variables internal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4059 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-07 18:33:53 +00:00
Chris Lattner
7d3f8671c1 - The extract tool now is sure to extract the function implementation for
the specified name instead of extracting the prototype if both exist.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4045 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 21:30:04 +00:00
Chris Lattner
d2f86e7ce6 Temporary change to make datastructure stuff link in right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4005 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:41:01 +00:00
Chris Lattner
1751b7ed27 Change LowerAllocations pass to 'require' TargetData instead of it being
passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3930 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 23:47:49 +00:00
Chris Lattner
93c26685bf Make sure to close the file before deleting it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3905 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 00:09:48 +00:00
Chris Lattner
cc377df7f5 * Remove the -stopraise option, which is no longer needed now that we have
the -debug-pass=Arguments option
* Run instcombining BEFORE mem2reg so that getelementptr X, long 0's are
  cleaned up.  This is also important because scalar replacement of aggr.
  will want instcombine to run before it goes as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3879 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-22 18:50:22 +00:00
Vikram S. Adve
dcde9bd285 Renamed library preselect to preopts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3841 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:43:20 +00:00
Chris Lattner
b4ee4f935e Minor non-functionality changing changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3833 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-19 20:48:48 +00:00
Chris Lattner
0f82df410c Indent a comment right, add a new one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3819 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-19 16:06:28 +00:00
Chris Lattner
d14d37614b Avoid deleting the ostream more than once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3816 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-18 23:30:05 +00:00
Vikram S. Adve
2f0a51c419 KEEP_SYMBOLS by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3813 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-18 11:55:44 +00:00
Chris Lattner
ec9962e44a Compile sub-directories in parallel, because they don't have interdependencies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3808 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-18 03:25:58 +00:00
Vikram S. Adve
0a4aa5a026 gcc3.1.1 seems much more selective about what it loads from archives, and
does not link in many passes that are loaded by gcc2.95.3.  So use object
files instead of archives in many more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3803 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-18 02:20:58 +00:00
Chris Lattner
72e66f4709 Enable correct support for dynamic loading on Linux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3780 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 20:40:24 +00:00
Chris Lattner
44756999dc Enable correct support for dynamic loading on Linux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 20:40:22 +00:00