summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
Commit message (Collapse)AuthorAgeFilesLines
* teach ipsccp and ipconstprop that a blockaddress doesn't 'take the address' ↵Chris Lattner2009-11-011-2/+4
| | | | | | | | | of a function in a way that should prevent ip constprop. This allows clang/test/CodeGen/indirect-goto.c to pass with the new indirect goto lowering. llvm-svn: 85709
* strengthen an assumption: RevectorBlockTo knows that PredBB Chris Lattner2009-11-011-12/+14
| | | | | | | | ended in an uncond branch because the pass requires BreakCriticalEdges. However, BCE doesn't eliminate critical adges from indbrs. llvm-svn: 85707
* if CostMetrics says to never duplicate some code, don't unswitch a loop.Chris Lattner2009-11-011-1/+2
| | | | | | This prevents unswitching from duplicating indbr's. llvm-svn: 85705
* Make sure PRE doesn't split crit edges from indirectbr.Chris Lattner2009-10-311-1/+5
| | | | llvm-svn: 85692
* llvm::SplitEdge should refuse to split an edge from an indirectbr.Chris Lattner2009-10-311-1/+2
| | | | | | Fix CodeGenPrepare to not try to split edges from indirectbr. llvm-svn: 85690
* add a comment.Chris Lattner2009-10-311-0/+4
| | | | llvm-svn: 85671
* Rename forgetLoopBackedgeTakenCount to forgetLoop, because itDan Gohman2009-10-313-3/+3
| | | | | | clears out more information than just the stored backedge taken count. llvm-svn: 85664
* Replace LoopUnrollPass.cpp's custom code-size estimation code usingDan Gohman2009-10-311-30/+5
| | | | | | the new common CodeMetrics code. llvm-svn: 85663
* Remove an unnecessary #include.Dan Gohman2009-10-311-1/+0
| | | | llvm-svn: 85661
* Update CMakeLists for recent renames.Dan Gohman2009-10-311-1/+1
| | | | llvm-svn: 85660
* Rename UnrollLoop.cpp to LoopUnroll.cpp, and LoopUnroll.cpp toDan Gohman2009-10-311-0/+0
| | | | | | | LoopUnrollPass.cpp, for consistency with other passes which are similarly split. llvm-svn: 85659
* Remove CodeGenLICM. It's largely obsoleted by MachineLICM's new abilityDan Gohman2009-10-312-113/+0
| | | | | | to unfold loop-invariant loads. llvm-svn: 85657
* Reapply r85634, with the bug fixed.Dan Gohman2009-10-311-15/+17
| | | | llvm-svn: 85655
* Revert 85634. It's breaking consumer-typeset (and others).Evan Cheng2009-10-311-17/+15
| | | | llvm-svn: 85641
* Optimize around the fact that pred_iterator is slow: instead of sortingDan Gohman2009-10-301-15/+17
| | | | | | | PHI operands by the predecessor order, sort them by the order used by the first PHI in the block. This is still suffucient to expose duplicates. llvm-svn: 85634
* Sort the incoming values in PHI nodes to match the predecessor order.Dan Gohman2009-10-301-0/+19
| | | | | | | This helps expose duplicate PHIs, which will make it easier for them to be eliminated. llvm-svn: 85623
* Add option to createGVNPass to disable PRE.Evan Cheng2009-10-301-2/+3
| | | | llvm-svn: 85609
* Apply some cleanups. No functionality changes.Nick Lewycky2009-10-291-27/+23
| | | | llvm-svn: 85498
* teach various passes about blockaddress. We no longerChris Lattner2009-10-291-24/+48
| | | | | | crash on any clang tests. llvm-svn: 85465
* No newline at end of file.Edward O'Callaghan2009-10-281-1/+1
| | | | llvm-svn: 85390
* Update CMake file.Benjamin Kramer2009-10-281-0/+1
| | | | llvm-svn: 85389
* Treat lifetime begin/end markers as allocations/frees respectively for theOwen Anderson2009-10-282-0/+41
| | | | | | purposes for GVN/DSE. llvm-svn: 85383
* Add ABCD, a generalized implementation of the Elimination of Array BoundsNick Lewycky2009-10-281-0/+1108
| | | | | | | | Checks on Demand algorithm which looks at arbitrary branches instead of loop iterations. This is GSoC work by Andre Tavares with only editorial changes applied! llvm-svn: 85382
* Factor out redundancy from clone() implementations.Devang Patel2009-10-271-1/+1
| | | | llvm-svn: 85327
* Rename MallocFreeHelper as MemoryBuiltinsVictor Hernandez2009-10-274-4/+4
| | | | llvm-svn: 85286
* VS build fix, patch by Marius Wachtler.Mike Stump2009-10-271-0/+1
| | | | llvm-svn: 85197
* Add objectsize intrinsic and hook it up through codegen. Doesn'tEric Christopher2009-10-271-0/+25
| | | | | | do anything than return "I don't know" at the moment. llvm-svn: 85189
* Add braces to avoid ambiguous else.Dan Gohman2009-10-271-1/+2
| | | | llvm-svn: 85185
* Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵Victor Hernandez2009-10-264-4/+4
| | | | | | to free() llvm-svn: 85181
* Add a straight-forward implementation of SCCVN for aggressively eliminating ↵Owen Anderson2009-10-261-0/+721
| | | | | | scalar redundancies. llvm-svn: 85179
* Remove FreeInst.Victor Hernandez2009-10-263-60/+5
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Simplify this code. LoopDeletion doesn't need to explicit check thatDan Gohman2009-10-261-24/+2
| | | | | | | the loop exiting block dominates the latch block; if ScalarEvolution can prove that the trip-count is finite, that's sufficient. llvm-svn: 85165
* Code that checks WillNotOverflowSignedAdd before creating an AddDan Gohman2009-10-261-8/+8
| | | | | | can safely use the NSW bit on the Add. llvm-svn: 85164
* Update CMake files.Ted Kremenek2009-10-261-0/+1
| | | | llvm-svn: 85161
* Check in the experimental GEP splitter pass. This pass splits complexDan Gohman2009-10-261-0/+81
| | | | | | | | | | GEPs (more than one non-zero index) into simple GEPs (at most one non-zero index). In some simple experiments using this it's not uncommon to see 3% overall code size wins, because it exposes redundancies that can be eliminated, however it's tricky to use because instcombine aggressively undoes the work that this pass does. llvm-svn: 85144
* Fix a typo in a comment.Dan Gohman2009-10-261-1/+1
| | | | llvm-svn: 85120
* reapply r85085 with a bugfix to avoid infinite looping.Chris Lattner2009-10-261-8/+47
| | | | | | | All of the 'demorgan' related xforms need to use dyn_castNotVal, not m_Not. llvm-svn: 85119
* Make LSR's OptimizeShadowIV ignore induction variables with negativeDan Gohman2009-10-261-0/+4
| | | | | | | | | | strides for now, because it doesn't handle them correctly. This fixes a miscompile of SingleSource/Benchmarks/Misc-C++/ray. This problem was usually hidden because indvars transforms such induction variables into negations of canonical induction variables. llvm-svn: 85118
* Revert 85085. It causes infinite looping during llvm-gcc build.Evan Cheng2009-10-261-45/+6
| | | | llvm-svn: 85090
* Implement PR3266 & PR5276, folding:Chris Lattner2009-10-261-6/+45
| | | | | | not (or (icmp, icmp)) -> and(icmp, icmp) llvm-svn: 85085
* Remove ICmpInst::isSignedPredicate which was a reimplementationNick Lewycky2009-10-253-25/+23
| | | | | | CmpInst::isSigned. llvm-svn: 85037
* Rename isLoopExit to isLoopExiting, for consistency with the wordingDan Gohman2009-10-241-1/+1
| | | | | | | | used elsewhere - an exit block is a block outside the loop branched to from within the loop. An exiting block is a block inside the loop that branches out. llvm-svn: 85019
* Rewrite LoopRotation's SSA updating code using SSAUpdater.Dan Gohman2009-10-241-226/+70
| | | | llvm-svn: 85016
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-243-7/+52
| | | | | | | Update all analysis passes and transforms to treat free calls just like FreeInst. Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised. llvm-svn: 84987
* Remove AllocationInst. Since MallocInst went away, AllocaInst is the only ↵Victor Hernandez2009-10-235-46/+45
| | | | | | subclass of AllocationInst, so it no longer is necessary. llvm-svn: 84969
* Make LoopDeletion check the maximum backedge taken count, rather than theDan Gohman2009-10-231-1/+1
| | | | | | | exact backedge taken count, when checking for infinite loops. This allows it to delete loops with multiple exit conditions. llvm-svn: 84952
* move another load optimization from instcombine -> libanalysis.Chris Lattner2009-10-221-12/+2
| | | | llvm-svn: 84841
* move 'loading i32 from string' optimization from instcombineChris Lattner2009-10-221-34/+0
| | | | | | | to libanalysis. Instcombine shrinking... does this even make sense??? llvm-svn: 84840
* Move some constant folding logic for loads out of instcombine intoChris Lattner2009-10-221-42/+18
| | | | | | | | | Analysis/ConstantFolding.cpp. This doesn't change the behavior of instcombine but makes other clients of ConstantFoldInstruction able to handle loads. This was partially extracted from Eli's patch in PR3152. llvm-svn: 84836
* fix PR5262.Chris Lattner2009-10-221-15/+42
| | | | llvm-svn: 84810
OpenPOWER on IntegriCloud