Chris Lattner
f31ae4da07
Make sure to remove the Select instruction as well
...
llvm-svn: 16389
2004-09-18 00:32:40 +00:00
Chris Lattner
228e66d208
Fix typo in comment
...
llvm-svn: 16384
2004-09-17 03:58:39 +00:00
Chris Lattner
e54e70266e
Add a newline
...
llvm-svn: 16369
2004-09-15 17:53:52 +00:00
Reid Spencer
c6a8d70cff
Convert code to compile with vc7.1.
...
Patch contributed by Paolo Invernizzi. Thanks Paolo!
llvm-svn: 16368
2004-09-15 17:06:42 +00:00
Chris Lattner
5751f19d86
Fix a bug in the previous checkin that broke 255.vortex
...
llvm-svn: 16355
2004-09-15 02:34:40 +00:00
Chris Lattner
6833186048
Make sure to update alias analysis information as we transform the function.
...
This fixes PR420 and Regression/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.llx
llvm-svn: 16348
2004-09-15 01:04:07 +00:00
Chris Lattner
1d9b957384
If given an AliasSetTracker object to update, update it.
...
llvm-svn: 16347
2004-09-15 01:02:54 +00:00
Chris Lattner
a7635e78c2
Remove a long-dead pass. Actually, this pass was never used at all.
...
llvm-svn: 16337
2004-09-14 16:33:01 +00:00
Alkis Evlogimenos
0c50e0f211
Fixes to make LLVM compile with vc7.1.
...
Patch contributed by Paolo Invernizzi!
llvm-svn: 16152
2004-09-03 18:19:51 +00:00
Reid Spencer
c4abcbefb1
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
7117a132ea
Initial checkin of a pass to lower packed operations to scalars operations.
...
This also registers the pass with opt with a -lower-packed command line
option.
Patch contributed by Brad Jones.
llvm-svn: 15987
2004-08-21 21:39:24 +00:00
Chris Lattner
9f60c755f8
If we are linking two global variables and they have the same size, do not
...
spew warnings, even if the types don't match.
llvm-svn: 15933
2004-08-20 00:30:39 +00:00
Chris Lattner
8e2dc1a98a
Implement test/Regression/Transforms/GlobalConstifier/phi-select.llx
...
This allows more globals to be marked constant, particularly global arrays.
llvm-svn: 15735
2004-08-14 20:57:17 +00:00
Chris Lattner
84445ee674
If we are extracting a block that has multiple successors that are the same
...
block (common in a switch), make sure to remove extra edges in successor
blocks. This fixes CodeExtractor/2004-08-12-BlockExtractPHI.ll and should
be pulled into LLVM 1.3 (though the regression test need not be, as that
would require pulling in the LoopExtract.cpp changes).
llvm-svn: 15717
2004-08-13 03:27:07 +00:00
Chris Lattner
2c3ad7902d
When we code extract some stuff, leave the codeRepl block in the place where
...
the extracted code was, instead of putting it at the end of the function
llvm-svn: 15716
2004-08-13 03:17:39 +00:00
Chris Lattner
8537ae6e2c
"extract" the block extractor pass from bugpoint (haha)
...
llvm-svn: 15714
2004-08-13 03:05:17 +00:00
Chris Lattner
7abc1c2473
Add value mapper support for select constant exprs. This should fix a bug
...
Nate ran into when bugpointing siod. This fix should go into LLVM 1.3
llvm-svn: 15712
2004-08-13 02:43:19 +00:00
Chris Lattner
32ad5d0bab
This patch makes the inliner refuse to inline functions that have alloca
...
instructions in the body of the function (not the entry block). This fixes
test/Programs/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c
and test/Programs/External/SPEC/CINT2000/176.gcc on zion.
This should obviously be pulled into 1.3.
llvm-svn: 15684
2004-08-12 05:45:09 +00:00
Chris Lattner
85e2339cfa
Fix code extraction of unwind blocks. This fixed bugs that bugpoint can
...
run into. This should go into 1.3
llvm-svn: 15679
2004-08-12 03:17:02 +00:00
Chris Lattner
430578a835
Hrm, this pass didn't compile. This bugfix should go into 1.3!
...
llvm-svn: 15676
2004-08-12 02:44:23 +00:00
Chris Lattner
2f98c58e84
Fix InstCombine/2004-08-10-BoolSetCC.ll, a bug that is miscompiling
...
176.gcc. Note that this is apparently not the only bug miscompiling gcc
though. :(
llvm-svn: 15639
2004-08-11 00:50:51 +00:00
Chris Lattner
32b5c4960c
Fix InstCombine/2004-08-09-RemInfLoop.llx
...
This should go into the 1.3 branch
llvm-svn: 15593
2004-08-09 21:05:48 +00:00
Chris Lattner
c5a25532c7
Fix another really nasty regression that Anshu pointed out. In cases where
...
dangling constant users were removed from a function, causing it to be dead,
we never removed the call graph edge from the external node to the function.
In most cases, this didn't cause a problem (by luck). This should definitely
go into 1.3
llvm-svn: 15570
2004-08-08 03:29:50 +00:00
Chris Lattner
0c29b326fb
Two fixes:
...
1. Fix a REALLY nasty cyclic replacement issue that Anshu discovered, causing
nondeterminstic crashes and memory corruption.
2. For performance, don't go inserting constantexpr casts of GV pointers.
This should definitely go into 1.3
llvm-svn: 15568
2004-08-08 01:30:07 +00:00
Chris Lattner
7f088ed899
This DEBUG is buggy. comment it out because it's not worth fixing. This
...
should go into 1.3
llvm-svn: 15567
2004-08-08 01:27:56 +00:00
Alkis Evlogimenos
f853362a44
Stop using getValues().
...
llvm-svn: 15487
2004-08-04 08:44:43 +00:00
Chris Lattner
41c8b70624
Fix a regression in InstCombine/xor.ll
...
llvm-svn: 15410
2004-08-01 19:42:59 +00:00
Chris Lattner
170b31f44d
Expose this as a functionpass
...
llvm-svn: 15369
2004-07-31 10:01:58 +00:00
Misha Brukman
4b70aa2e78
Fix De Morgan's name.
...
llvm-svn: 15343
2004-07-30 12:50:08 +00:00
Chris Lattner
e63c404df2
Start using the PatternMatcher a bit.
...
llvm-svn: 15342
2004-07-30 07:50:03 +00:00
Misha Brukman
8760d70159
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15337
2004-07-29 17:30:57 +00:00
Misha Brukman
58104df77b
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Misha Brukman
2a80e53645
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15328
2004-07-29 17:05:13 +00:00
Alkis Evlogimenos
fb27f702ca
Merge i*.h headers into Instructions.h as part of bug403.
...
llvm-svn: 15325
2004-07-29 12:17:34 +00:00
Robert Bocchino
4325ca6606
This change fixed a bug in the function visitMul. The prior version
...
assumed that a constant on the RHS of a multiplication was either an
IntConstant or an FPConstant. It checked for an IntConstant and then,
if it did not find one, did a hard cast to an FPConstant. That code
would crash if the RHS were a ConstantExpr that was neither an
IntConstant nor an FPConstant. This version replaces the hard cast
with a dyn_cast. It performs the same way for IntConstants and
FPConstants but does nothing, instead of crashing, for constant
expressions.
The regression test for this change is 2004-07-27-ConstantExprMul.ll.
llvm-svn: 15291
2004-07-27 21:02:21 +00:00
Brian Gaeke
45adb41f46
Make the create...() functions for some of these passes return a FunctionPass *.
...
llvm-svn: 15276
2004-07-27 17:43:21 +00:00
Chris Lattner
5cfb85064e
Fix hoisting of void typed values, e.g. calls
...
llvm-svn: 15263
2004-07-27 07:38:32 +00:00
Chris Lattner
59aff88abe
Implement DeadStoreElim/alloca.llx by observing that allocas are dead at the
...
end of the function (either return or unwind)
llvm-svn: 15232
2004-07-26 06:14:11 +00:00
Chris Lattner
c2e9c56906
Throttle back indvar substitution from creating multiplies in loops. This is bad bad bad.
...
llvm-svn: 15227
2004-07-26 02:47:12 +00:00
Chris Lattner
a259f9201c
* Substantially simplify how free instructions are handled (potentially fixing
...
a bug in DSE).
* Delete dead operand uses iteratively instead of recursively, using a
SetVector.
* Defer deletion of dead operand uses until the end of processing, which means
we don't have to bother with updating the AliasSetTracker. This speeds up
DSE substantially.
llvm-svn: 15204
2004-07-25 11:09:56 +00:00
Chris Lattner
0a9d5e6f14
Free instructions kill values too. This implements DeadStoreElim/free.llx
...
llvm-svn: 15199
2004-07-25 07:58:38 +00:00
Chris Lattner
29e97f36bf
obvious fix
...
llvm-svn: 15162
2004-07-24 07:51:27 +00:00
Chris Lattner
7e9731bc4f
This is a trivial dead store elimination pass. It very very simple and
...
can be improved in many ways. But: stop laughing, even with -basicaa it
deletes 15% of the stores in 252.eon :)
llvm-svn: 15101
2004-07-22 08:00:28 +00:00
Chris Lattner
7b301dfa9d
Update GC intrinsics to take a pointer to the object as well as a pointer
...
to the field being updated. Patch contributed by Tobias Nurmiranta
llvm-svn: 15097
2004-07-22 05:51:13 +00:00
Brian Gaeke
f18cdca667
These files don't need to include <iostream> since they include "Support/Debug.h".
...
llvm-svn: 15089
2004-07-21 20:50:33 +00:00
Chris Lattner
b77bda4432
* Further cleanup.
...
* Test for whether bits are shifted out during the optzn.
If so, the fold is illegal, though it can be handled explicitly for setne/seteq
This fixes the miscompilation of 254.gap last night, which was a latent bug
exposed by other optimizer improvements.
llvm-svn: 15085
2004-07-21 20:14:10 +00:00
Chris Lattner
a3c10c2012
Make cast-cast code a bit more defensive
...
"simplify" a bit of code for comparison/and folding
llvm-svn: 15082
2004-07-21 19:50:44 +00:00
Chris Lattner
62c40d3982
Remove special casing of pointers and treat them generically as integers of
...
the appopriate size. This gives us the ability to eliminate int -> ptr -> int
llvm-svn: 15063
2004-07-21 04:27:24 +00:00
Chris Lattner
4e4b8b0ad2
Fix a serious code pessimization problem. If an inlined function has a single
...
return, clone the 'ret' BB code into the block AFTER the inlined call, not the
other way around.
llvm-svn: 15030
2004-07-20 05:45:24 +00:00
Chris Lattner
f8c20caf25
Implement Transforms/InstCombine/IntPtrCast.ll
...
llvm-svn: 15029
2004-07-20 05:21:00 +00:00