summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Implement test/Regression/Transforms/GlobalConstifier/phi-select.llxChris Lattner2004-08-141-6/+16
| | | | | | This allows more globals to be marked constant, particularly global arrays. llvm-svn: 15735
* If we are extracting a block that has multiple successors that are the sameChris Lattner2004-08-131-2/+11
| | | | | | | | | 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
* When we code extract some stuff, leave the codeRepl block in the place whereChris Lattner2004-08-131-1/+1
| | | | | | the extracted code was, instead of putting it at the end of the function llvm-svn: 15716
* "extract" the block extractor pass from bugpoint (haha)Chris Lattner2004-08-131-0/+53
| | | | llvm-svn: 15714
* Add value mapper support for select constant exprs. This should fix a bugChris Lattner2004-08-131-0/+5
| | | | | | Nate ran into when bugpointing siod. This fix should go into LLVM 1.3 llvm-svn: 15712
* This patch makes the inliner refuse to inline functions that have allocaChris Lattner2004-08-121-25/+57
| | | | | | | | | | 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
* Fix code extraction of unwind blocks. This fixed bugs that bugpoint canChris Lattner2004-08-121-9/+12
| | | | | | run into. This should go into 1.3 llvm-svn: 15679
* Hrm, this pass didn't compile. This bugfix should go into 1.3!Chris Lattner2004-08-121-0/+1
| | | | llvm-svn: 15676
* Fix InstCombine/2004-08-10-BoolSetCC.ll, a bug that is miscompilingChris Lattner2004-08-111-22/+21
| | | | | | | 176.gcc. Note that this is apparently not the only bug miscompiling gcc though. :( llvm-svn: 15639
* Fix InstCombine/2004-08-09-RemInfLoop.llxChris Lattner2004-08-091-1/+1
| | | | | | This should go into the 1.3 branch llvm-svn: 15593
* Fix another really nasty regression that Anshu pointed out. In cases whereChris Lattner2004-08-081-24/+24
| | | | | | | | | | 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
* Two fixes:Chris Lattner2004-08-081-3/+2
| | | | | | | | | | 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
* This DEBUG is buggy. comment it out because it's not worth fixing. ThisChris Lattner2004-08-081-1/+2
| | | | | | should go into 1.3 llvm-svn: 15567
* Stop using getValues().Alkis Evlogimenos2004-08-043-20/+18
| | | | llvm-svn: 15487
* Fix a regression in InstCombine/xor.llChris Lattner2004-08-011-2/+2
| | | | llvm-svn: 15410
* Expose this as a functionpassChris Lattner2004-07-311-1/+3
| | | | llvm-svn: 15369
* Fix De Morgan's name.Misha Brukman2004-07-301-2/+2
| | | | llvm-svn: 15343
* Start using the PatternMatcher a bit.Chris Lattner2004-07-301-112/+88
| | | | llvm-svn: 15342
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-291-1/+0
| | | | llvm-svn: 15337
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-2924-49/+25
| | | | llvm-svn: 15334
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-297-15/+7
| | | | llvm-svn: 15328
* Merge i*.h headers into Instructions.h as part of bug403.Alkis Evlogimenos2004-07-294-8/+4
| | | | llvm-svn: 15325
* This change fixed a bug in the function visitMul. The prior versionRobert Bocchino2004-07-271-3/+3
| | | | | | | | | | | | | | | 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
* Make the create...() functions for some of these passes return a FunctionPass *.Brian Gaeke2004-07-272-2/+2
| | | | llvm-svn: 15276
* Fix hoisting of void typed values, e.g. callsChris Lattner2004-07-271-7/+13
| | | | llvm-svn: 15263
* Implement DeadStoreElim/alloca.llx by observing that allocas are dead at theChris Lattner2004-07-261-1/+4
| | | | | | end of the function (either return or unwind) llvm-svn: 15232
* Throttle back indvar substitution from creating multiplies in loops. This ↵Chris Lattner2004-07-261-3/+3
| | | | | | is bad bad bad. llvm-svn: 15227
* * Substantially simplify how free instructions are handled (potentially fixingChris Lattner2004-07-251-43/+52
| | | | | | | | | | | 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
* Free instructions kill values too. This implements DeadStoreElim/free.llxChris Lattner2004-07-251-4/+13
| | | | llvm-svn: 15199
* obvious fixChris Lattner2004-07-241-0/+1
| | | | llvm-svn: 15162
* This is a trivial dead store elimination pass. It very very simple andChris Lattner2004-07-221-0/+139
| | | | | | | can be improved in many ways. But: stop laughing, even with -basicaa it deletes 15% of the stores in 252.eon :) llvm-svn: 15101
* Update GC intrinsics to take a pointer to the object as well as a pointerChris Lattner2004-07-221-5/+8
| | | | | | to the field being updated. Patch contributed by Tobias Nurmiranta llvm-svn: 15097
* These files don't need to include <iostream> since they include ↵Brian Gaeke2004-07-217-8/+0
| | | | | | "Support/Debug.h". llvm-svn: 15089
* * Further cleanup.Chris Lattner2004-07-211-9/+27
| | | | | | | | | | | * 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
* Make cast-cast code a bit more defensiveChris Lattner2004-07-211-32/+42
| | | | | | "simplify" a bit of code for comparison/and folding llvm-svn: 15082
* Remove special casing of pointers and treat them generically as integers ofChris Lattner2004-07-211-8/+5
| | | | | | the appopriate size. This gives us the ability to eliminate int -> ptr -> int llvm-svn: 15063
* Fix a serious code pessimization problem. If an inlined function has a singleChris Lattner2004-07-201-5/+6
| | | | | | | return, clone the 'ret' BB code into the block AFTER the inlined call, not the other way around. llvm-svn: 15030
* Implement Transforms/InstCombine/IntPtrCast.llChris Lattner2004-07-201-11/+16
| | | | llvm-svn: 15029
* Ignore instructions that are in trivially dead functions. This allows usChris Lattner2004-07-201-4/+17
| | | | | | to constify 14 globals instead of 4 in a trivial C++ testcase. llvm-svn: 15027
* Implement InstCombine/GEPIdxCanon.llChris Lattner2004-07-201-1/+10
| | | | llvm-svn: 15024
* Implement SimplifyCFG/BrUnwind.llChris Lattner2004-07-201-2/+9
| | | | llvm-svn: 15022
* Rewrite cast->cast elimination code completely based on the information weChris Lattner2004-07-201-43/+53
| | | | | | | | actually care about. Someday when the cast instruction is gone, we can do better here, but this will do for now. This implements instcombine/cast.ll:test17/18 as well. llvm-svn: 15018
* Fix a performance regression from the CPR patch, simplify codeChris Lattner2004-07-181-14/+6
| | | | llvm-svn: 14974
* Strip out and simplify some code. This also fixes the regression lastChris Lattner2004-07-181-9/+2
| | | | | | | | | | night compiling cfrac. It did not realize that code like this: int G; int *H = &G; takes the address of G. llvm-svn: 14973
* Minor cleanup, no functionality changeChris Lattner2004-07-181-7/+2
| | | | llvm-svn: 14972
* Remove an if statement that would never be reached.Reid Spencer2004-07-181-3/+1
| | | | llvm-svn: 14968
* Delete a redundant if branch.Reid Spencer2004-07-181-4/+1
| | | | llvm-svn: 14967
* Expand the coercion of constants to include the newly constant Globals.Reid Spencer2004-07-181-2/+1
| | | | llvm-svn: 14966
* Delete a no-op loop.Reid Spencer2004-07-181-9/+0
| | | | llvm-svn: 14965
* Expand the scope to include global values because they are now constantsReid Spencer2004-07-181-1/+1
| | | | | | too. llvm-svn: 14964
OpenPOWER on IntegriCloud