summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* Fix SimplifyCFG/2005-12-03-IncorrectPHIFold.llChris Lattner2005-12-031-8/+14
| | | | llvm-svn: 24581
* Implement a refinement to the mem2reg algorithm for cases where an allocaChris Lattner2005-11-181-0/+55
| | | | | | | | | | has a single def. In this case, look for uses that are dominated by the def and attempt to rewrite them to directly use the stored value. This speeds up mem2reg on these values and reduces the number of phi nodes inserted. This should address PR665. llvm-svn: 24411
* This needs proper dominanceChris Lattner2005-11-181-5/+14
| | | | llvm-svn: 24410
* Fix #include orderChris Lattner2005-10-271-1/+1
| | | | llvm-svn: 24044
* Move some constant folding code shared by Analysis and Transform passesJohn Criswell2005-10-272-142/+2
| | | | | | | | into the LLVMAnalysis library. This allows LLVMTranform and LLVMTransformUtils to be archives and linked with LLVMAnalysis.a, which provides any missing definitions. llvm-svn: 24036
* 1. Remove libraries no longer created from the list of libraries linked into theJohn Criswell2005-10-261-1/+0
| | | | | | | | | | SparcV9 JIT. 2. Make LLVMTransformUtils a relinked object file and always link it before LLVMAnalysis.a. These two libraries have circular dependencies on each other which creates problem when building the SparcV9 JIT. This change fixes the dependency on all platforms problems with a minimum of fuss. llvm-svn: 24023
* Update Visual Studio projects to reflect moved file.Jeff Cohen2005-10-261-0/+855
| | | | llvm-svn: 23998
* DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE nowChris Lattner2005-10-241-1/+0
| | | | llvm-svn: 23940
* Only build .a file versions of these libraries, instead of .a and .o versions.Chris Lattner2005-10-241-0/+2
| | | | | | This should speed up build times. llvm-svn: 23933
* Fix DemoteRegToStack on an invoke. This fixes PR634.Chris Lattner2005-10-041-1/+2
| | | | llvm-svn: 23618
* Clean up the code a bit. Use isInstructionTriviallyDead to be more aggressiveChris Lattner2005-10-031-4/+8
| | | | | | | and more correct than use_empty(). This fixes PR635 and SimplifyCFG/2005-10-02-InvokeSimplify.ll llvm-svn: 23616
* Constant fold llvm.sqrtChris Lattner2005-09-281-1/+9
| | | | llvm-svn: 23487
* allow demotion to volatile values, add support for invokeChris Lattner2005-09-271-12/+15
| | | | llvm-svn: 23473
* Move the ConstantFoldLoadThroughGEPConstantExpr function out of the InstCombineChris Lattner2005-09-261-1/+45
| | | | | | pass. llvm-svn: 23444
* remove some debugging codeChris Lattner2005-09-231-1/+0
| | | | llvm-svn: 23411
* Fold two consequtive branches that share a common destination between them.Chris Lattner2005-09-231-33/+119
| | | | | | | This implements SimplifyCFG/branch-fold.ll, and is useful on ?:/min/max heavy code llvm-svn: 23410
* simplify some logic furtherChris Lattner2005-09-231-6/+1
| | | | llvm-svn: 23408
* pull a bunch of logic out of SimplifyCFG into a helper fnChris Lattner2005-09-231-112/+112
| | | | llvm-svn: 23407
* Start threading across blocks with code in them, so long as the code doesChris Lattner2005-09-201-15/+64
| | | | | | | | | not define a value that is used outside of it's block. This catches many more simplifications, e.g. 854 in 176.gcc, 137 in vpr, etc. This implements branch-phi-thread.ll:test3.ll llvm-svn: 23397
* Implement merging of blocks with the same condition if the block has multipleChris Lattner2005-09-201-21/+59
| | | | | | predecessors. This implements branch-phi-thread.ll::test1 llvm-svn: 23395
* Reject a case we don't handle yetChris Lattner2005-09-191-1/+3
| | | | llvm-svn: 23393
* remove debugging code :-/Chris Lattner2005-09-191-2/+0
| | | | llvm-svn: 23392
* Implement SimplifyCFG/branch-phi-thread.ll, the most trivial case of threadingChris Lattner2005-09-191-0/+73
| | | | | | | control across branches with determined outcomes. More generality to follow. This triggers a couple thousand times in specint. llvm-svn: 23391
* Teach SplitCriticalEdge to update LoopInfo if it is alive. This fixesChris Lattner2005-08-131-0/+31
| | | | | | | a problem in LoopStrengthReduction, where it would split critical edges then confused itself with outdated loop information. llvm-svn: 22776
* Change break critical edges to not remove, then insert, PHI node entries.Chris Lattner2005-08-121-2/+2
| | | | | | | Instead, just update the BB in-place. This is both faster, and it prevents split-critical-edges from shuffling the PHI argument list unneccesarily. llvm-svn: 22765
* This code can handle non-dominating instructionsChris Lattner2005-08-051-1/+1
| | | | llvm-svn: 22667
* Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization intoNate Begeman2005-08-042-36/+1
| | | | | | | | BasicBlock's removePredecessor routine. This requires shuffling around the definition and implementation of hasContantValue from Utils.h,cpp into Instructions.h,cpp llvm-svn: 22664
* Fix Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll, a problem thatChris Lattner2005-08-031-2/+3
| | | | | | occurred while bugpointing another testcase llvm-svn: 22621
* Finally, add the required constraint checks to fix ↵Chris Lattner2005-08-031-2/+29
| | | | | | | | Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll the right way llvm-svn: 22615
* Simplify some code, add the correct pred checksChris Lattner2005-08-031-16/+25
| | | | llvm-svn: 22613
* Refactor code out of PropagatePredecessorsForPHIs, turning it into a pure ↵Chris Lattner2005-08-031-37/+36
| | | | | | function with no side-effects llvm-svn: 22612
* use splice instead of remove/insert to avoid some symtab operationsChris Lattner2005-08-031-2/+2
| | | | llvm-svn: 22611
* move two functions up in the file, use SafeToMergeTerminators to eliminateChris Lattner2005-08-031-61/+45
| | | | | | some duplicated code llvm-svn: 22610
* Rip some code out of the main SimplifyCFG function into a subfunction andChris Lattner2005-08-031-78/+72
| | | | | | call it from the only place it is live. No functionality changes. llvm-svn: 22609
* Disable this patch:Chris Lattner2005-08-021-1/+1
| | | | | | | | | http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050801/027345.html This breaks real programs and only fixes an obscure regression testcase. A real fix is in development. llvm-svn: 22606
* Change a place to use an arbitrary value instead of null, when possibleChris Lattner2005-08-021-3/+3
| | | | llvm-svn: 22605
* This code was very close, but not quite right. It did not take intoChris Lattner2005-08-021-3/+10
| | | | | | | | consideration the case where a reference in an unreachable block could occur. This fixes Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll, something I ran into while bugpoint'ing another pass. llvm-svn: 22584
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-274-6/+6
| | | | llvm-svn: 22523
* Fix PR590 and Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll.Chris Lattner2005-06-301-19/+65
| | | | | | | | The optimization for locally used allocas was not safe for allocas that were read before they were written. This change disables that optimization in that case. llvm-svn: 22318
* prevent DCE of vaarg intrinsics. This should take care of most regressionsAndrew Lenharth2005-06-191-2/+0
| | | | llvm-svn: 22263
* Don't crash on: X = phi (X, X).Chris Lattner2005-06-171-6/+9
| | | | | | This fixes PR584 and Transforms/SimplifyCFG/2005-06-16-PHICrash.ll llvm-svn: 22232
* Fix Transforms/SimplifyCFG/switch-simplify-crash.llChris Lattner2005-05-201-0/+7
| | | | llvm-svn: 22158
* Make sure to preserve the calling convention when changing an invoke intoChris Lattner2005-05-141-0/+2
| | | | | | | a call. This fixes Prolangs-C++/deriv2, kimwitu++, and Misc-C++/bigfib on X86 with -enable-x86-fastcc. llvm-svn: 22023
* wrap long lines, preserve calling conventions when cloning functions andChris Lattner2005-05-092-6/+14
| | | | | | turning calls into invokes llvm-svn: 21797
* BAD typeo which caused many testsuite failures last night. Note to self, doChris Lattner2005-05-061-1/+1
| | | | | | not change code after testing it without retesting! llvm-svn: 21741
* Implement Transforms/Inline/inline-tail.llChris Lattner2005-05-061-1/+16
| | | | llvm-svn: 21736
* DCE intrinsic instructions without side effects.Chris Lattner2005-05-061-1/+20
| | | | llvm-svn: 21719
* Remove optimizations that don't require both operands to be constant. TheseReid Spencer2005-04-291-10/+0
| | | | | | are moved to simplify-libcalls pass. llvm-svn: 21614
* * Add constant folding for additional floating point library calls such asReid Spencer2005-04-281-26/+90
| | | | | | | | sinh, cosh, etc. * Make the name comparisons for the fp libcalls a little more efficient by switching on the first character of the name before doing comparisons. llvm-svn: 21611
* Eliminate tabs and trailing spacesJeff Cohen2005-04-231-10/+10
| | | | llvm-svn: 21480
OpenPOWER on IntegriCloud