Commit Graph

5861 Commits

Author SHA1 Message Date
Chris Lattner 9810b94850 Fix several bugs:
* Warnings were emitted all of the time and were really annoying
  * Functions could not be resolved unless they had external linkage.  Linkonce
    linkage was not allowed
  * ConstantPointerRef's were not handled when linking functions
    we now actually handle cast (CPR) to X -> cast (NewCPR) to X

llvm-svn: 5967
2003-04-28 01:23:29 +00:00
Chris Lattner 4a6c3e79b0 Avoid naming things exactly the same
llvm-svn: 5966
2003-04-27 22:55:56 +00:00
Chris Lattner cb2434d38d New testcase distilled from a problem identified by sumant
llvm-svn: 5964
2003-04-26 20:29:09 +00:00
Chris Lattner 4f6cdbdf81 Remove two fields from TargetData which are target specific.
llvm-svn: 5963
2003-04-26 20:11:09 +00:00
Chris Lattner 25900cf220 The promotion rules are the same for all targets, they are set by the C standard.
llvm-svn: 5962
2003-04-26 19:47:36 +00:00
Chris Lattner 21d4509d76 IntegerRegSize is always 8 for sparc
llvm-svn: 5961
2003-04-26 19:44:35 +00:00
Chris Lattner e8689fd052 Switch insns actually DO work.
llvm-svn: 5960
2003-04-26 19:36:06 +00:00
Chris Lattner d021c2d56b Fix bug: LoopPreheaders/2003-04-25-AssertFail.ll
llvm-svn: 5959
2003-04-26 19:34:18 +00:00
Chris Lattner 4852f3aefd Add comment to testcase
llvm-svn: 5958
2003-04-26 19:33:51 +00:00
Chris Lattner 72eac6ccac Whoever checked this testcase in apparently never tested it.
llvm-svn: 5957
2003-04-26 17:44:17 +00:00
Chris Lattner 91e0564f75 Revert last checkin. Note that PHI nodes can use basic blocks also!
llvm-svn: 5956
2003-04-26 17:38:26 +00:00
Chris Lattner 201b4b9c88 Remove long-dead obsolete cruft
llvm-svn: 5955
2003-04-25 23:39:08 +00:00
Chris Lattner 35874f1e3c New testcase that crashes preheaders
llvm-svn: 5954
2003-04-25 23:26:52 +00:00
Chris Lattner ef8c8332b1 Fix a bug that occurred when removing the last predecessor INTO an
infinite loop

llvm-svn: 5953
2003-04-25 23:14:19 +00:00
Chris Lattner b68a34eb3f Fix bug: ADCE/2003-04-25-PHIPostDominateProblem.ll
llvm-svn: 5952
2003-04-25 22:53:27 +00:00
Chris Lattner b093bf312f New testcase
llvm-svn: 5951
2003-04-25 22:53:12 +00:00
Chris Lattner 8d8de422dd Add options to disable simplification with passes, in case one of them crashes
llvm-svn: 5950
2003-04-25 22:08:12 +00:00
Chris Lattner 2a2338f1ba Fix bogus assert
llvm-svn: 5949
2003-04-25 21:58:54 +00:00
Chris Lattner 1fcfaf5bc0 Fix bug: Assembler/2003-04-25-UnresolvedGlobalReference.ll
llvm-svn: 5948
2003-04-25 21:47:33 +00:00
Chris Lattner d2a969dd98 New testcase
llvm-svn: 5947
2003-04-25 20:09:17 +00:00
Chris Lattner 9501cefa9f Fix bugs in testcase
llvm-svn: 5946
2003-04-25 19:49:36 +00:00
Chris Lattner fde0022b90 Add comment
llvm-svn: 5945
2003-04-25 18:44:30 +00:00
Chris Lattner 01971e1267 Only do the %ld -> %lld promotion when running a 64 bit bytecode on a 32 bit host
llvm-svn: 5942
2003-04-25 18:28:44 +00:00
Chris Lattner 4c5245b144 Add __strdup
llvm-svn: 5941
2003-04-25 18:23:38 +00:00
Chris Lattner be2d24e3b5 Fix BasicAA/2003-04-25-GEPCrash.ll
llvm-svn: 5940
2003-04-25 18:03:06 +00:00
Chris Lattner 25047dd9b9 New testcase
llvm-svn: 5939
2003-04-25 17:59:02 +00:00
Chris Lattner 6fac66e2cc MAke sure that LLI properly configures align_of(double)
llvm-svn: 5938
2003-04-25 06:15:05 +00:00
Chris Lattner b05f851d59 Whoops, 32 bit targets have _4_ byte pointers, not _32_ byte pointers!
llvm-svn: 5937
2003-04-25 06:06:43 +00:00
Chris Lattner 8d6d4257a0 Make sure to copy double alignment as well
llvm-svn: 5936
2003-04-25 06:06:13 +00:00
Chris Lattner afdf01ef62 Fix compatibility bug: X86 aligns doubles to 4 bytes, not 8!
llvm-svn: 5935
2003-04-25 06:05:57 +00:00
Chris Lattner d64b2de3c8 Kill using declarations
llvm-svn: 5934
2003-04-25 05:26:11 +00:00
Chris Lattner d6df41d389 Fix method name type-o
llvm-svn: 5933
2003-04-25 05:23:27 +00:00
Chris Lattner efbae9cff1 Fix obvious type-o
llvm-svn: 5932
2003-04-25 05:23:10 +00:00
Chris Lattner 21a7218c5f Make sure to add a targetdata instance to the passmanager, and make it match the
one in use by the TargetMachine

llvm-svn: 5931
2003-04-25 05:22:29 +00:00
Chris Lattner ba90675054 Fix problem where we would read 64 bits worth of pointer information, even on 32 bit targets!
llvm-svn: 5930
2003-04-25 04:21:19 +00:00
Chris Lattner 3c98276168 Fix major problem with PHI node traversal: rechecking PHIs should go into
the visit function.  The worklist is for when their lattice value changes.

llvm-svn: 5927
2003-04-25 03:35:10 +00:00
Chris Lattner 0347cda8b8 Rename Kept -> Suffix
FIX problem where we were incorrectly putting the prefix of the list into the "suffix" list.

llvm-svn: 5926
2003-04-25 03:16:33 +00:00
Chris Lattner 4a1a9d2cdd Rename Kept -> Suffix
Fix problem where we accidentally returned KeepPrefix instead of KeepSuffix!

llvm-svn: 5925
2003-04-25 03:16:05 +00:00
Chris Lattner e17c1c5ad8 ** CORRECTLY, conservatively handle constant expressions
llvm-svn: 5924
2003-04-25 02:52:06 +00:00
Chris Lattner a2f7d23e9a *** Huge: Make constantexprs be handled correctly, conservatively
llvm-svn: 5923
2003-04-25 02:51:46 +00:00
Chris Lattner e483398516 Allow for easy detection of when a "default" TargetData is created by the
passmanager, which is never the right thing to do.

llvm-svn: 5922
2003-04-25 02:50:45 +00:00
Chris Lattner 06aa504555 Default ctor doesn't provide name
llvm-svn: 5921
2003-04-25 02:50:19 +00:00
Chris Lattner cccc5c76c8 Minor non-functional changes:
* Spell propagate right
  * Improve performance of phi node handling
  * Delete using directive
  * Other minor changes

llvm-svn: 5920
2003-04-25 02:50:03 +00:00
Chris Lattner 3a2fe67908 Fix bug: mem2reg/2003-04-24-MultipleIdenticalSuccessors.ll
llvm-svn: 5919
2003-04-25 00:54:58 +00:00
Chris Lattner 65e5f653fd 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.

llvm-svn: 5918
2003-04-25 00:53:05 +00:00
Chris Lattner b0143880f4 When cleaning up the final bytecode file, make sure to run DTE as well
llvm-svn: 5917
2003-04-25 00:52:30 +00:00
Chris Lattner 0cd5d533d0 New testcase
llvm-svn: 5916
2003-04-25 00:46:14 +00:00
Chris Lattner f32939bbc9 Speed up convergence significantly and also reduce the size of testcases by making large portions of a function's CFG dead at a time.
llvm-svn: 5915
2003-04-24 23:51:38 +00:00
Chris Lattner de39f2bdac 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!

llvm-svn: 5914
2003-04-24 22:54:06 +00:00
Chris Lattner 10c0469be1 Remove dead functions
llvm-svn: 5913
2003-04-24 22:53:24 +00:00