summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-1/+1
| | | | llvm-svn: 109045
* Use ValueMap instead of DenseMap.Devang Patel2010-06-241-13/+13
| | | | | | The ValueMapper used by various cloning utility maps MDNodes also. llvm-svn: 106706
* Pulled CodeMetrics out of InlineCost.h and made it a bit more general, so it ↵Kenneth Uildriks2010-06-091-1/+1
| | | | | | can be reused from PartialSpecializationCost llvm-svn: 105725
* remove a bunch of ad-hoc code to simplify instructions fromChris Lattner2010-04-201-43/+12
| | | | | | | loop unswitch, and use inst simplify instead. It is more powerful and less duplication. llvm-svn: 101874
* RewriteLoopBodyWithConditionConstant can end up rewriting theChris Lattner2010-04-201-5/+14
| | | | | | | | condition we're unswitching on. In this case, don't try to simplify the second copy of the loop which may be dead or not, but is probably a constant now. This fixes PR6879 llvm-svn: 101870
* some code cleanups, use SwitchInst::findCaseValue, reduce indentationChris Lattner2010-04-051-62/+63
| | | | llvm-svn: 100468
* Code clean up.Evan Cheng2010-04-051-8/+8
| | | | llvm-svn: 100467
* Code refactoring.Evan Cheng2010-04-031-35/+33
| | | | llvm-svn: 100262
* Add a DominatorTree argument to isLCSSA so that it doesn't have toDan Gohman2010-03-101-1/+1
| | | | | | | compute a set of reachable blocks for itself each time it is called, which is fairly frequently. llvm-svn: 98179
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-1/+1
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-5/+5
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* fix a crash in loop unswitch on a loop invariant vector condition.Chris Lattner2010-02-021-1/+5
| | | | llvm-svn: 95055
* Convert a ton of simple integer type equality tests to the new predicate.Benjamin Kramer2010-01-051-5/+5
| | | | llvm-svn: 92760
* Change errs() to dbgs().David Greene2010-01-051-8/+8
| | | | llvm-svn: 92608
* Add Loop contains utility methods for testing whether a loopDan Gohman2009-12-181-2/+2
| | | | | | | | contains another loop, or an instruction. The loop form is substantially more efficient on large loops than the typical code it replaces. llvm-svn: 91654
* Dereference loopHeader after checking for null rather than before.Dan Gohman2009-12-091-1/+2
| | | | llvm-svn: 90990
* Reverting patch in revision 89758, initial attempt at fixing PR5373 has ↵Edward O'Callaghan2009-11-251-0/+1
| | | | | | proven to be bogus. llvm-svn: 89844
* Fix for PR5373, Credit to Jakub Staszak.Edward O'Callaghan2009-11-241-1/+0
| | | | llvm-svn: 89758
* remove a bunch of extraneous LLVMContext argumentsChris Lattner2009-11-061-2/+1
| | | | | | from various APIs, addressing PR5325. llvm-svn: 86231
* Update various Loop optimization passes to cope with the possibility thatDan Gohman2009-11-051-0/+4
| | | | | | LoopSimplify form may not be available. llvm-svn: 86175
* 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
* Restore LoopUnswitch's block-oriented threshold. LoopUnswitch now checks bothDan Gohman2009-10-201-36/+27
| | | | | | | | | the estimated code size and the number of blocks when deciding whether to do a non-trivial unswitch. This protects it from some very undesirable worst-case behavior on large numbers of loop-unswitchable conditions, such as in the testcase in PR5259. llvm-svn: 84661
* Use isVoidTy()Devang Patel2009-10-141-1/+1
| | | | llvm-svn: 84118
* Check void type before using RAUWd.Devang Patel2009-10-131-1/+4
| | | | llvm-svn: 84049
* Do not check use_empty() before replaceAllUsesWith(). This gives ↵Devang Patel2009-10-131-2/+1
| | | | | | ValueHandles a chance to get properly updated. llvm-svn: 84033
* Use the new CodeMetrics class to compute code size instead ofDan Gohman2009-10-131-6/+6
| | | | | | manually counting instructions. llvm-svn: 84016
* Make LoopUnswitch's cost estimation count Instructions, rather thanDan Gohman2009-10-131-19/+7
| | | | | | | | BasicBlocks, so that it doesn't blindly procede in the presence of large individual BasicBlocks. This addresses a class of code-size expansion problems. llvm-svn: 83992
* Reflow comment.Mike Stump2009-09-091-5/+5
| | | | llvm-svn: 81361
* Fix an 80-column violation.Dan Gohman2009-09-091-3/+3
| | | | llvm-svn: 81354
* Re-apply r80926, with fixes: keep the domtree informed of new blocksDan Gohman2009-09-081-62/+43
| | | | | | | | | | | | | | | that get created during loop unswitching, and fix SplitBlockPredecessors' LCSSA updating code to create new PHIs instead of trying to just move existing ones. Also, optimize Loop::verifyLoop, since it gets called a lot. Use searches on a sorted list of blocks instead of calling the "contains" function, as is done in other places in the Loop class, since "contains" does a linear search. Also, don't call verifyLoop from LoopSimplify or LCSSA, as the PassManager is already calling verifyLoop as part of LoopInfo's verifyAnalysis. llvm-svn: 81221
* Revert r80926. It causes loop unswitch assertion and slow down some JIT ↵Evan Cheng2009-09-061-33/+62
| | | | | | tests significantly. llvm-svn: 81101
* Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verifyDan Gohman2009-09-031-62/+33
| | | | | | | | | that these passes are properly preserved. Fix several transformation passes that claimed to preserve LoopSimplify form but weren't. llvm-svn: 80926
* eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861Chris Lattner2009-09-021-2/+1
| | | | llvm-svn: 80766
* eliminate the "Value" printing methods that print to a std::ostream.Chris Lattner2009-08-231-4/+4
| | | | | | This required converting a bunch of stuff off DOUT and other cleanups. llvm-svn: 79819
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-8/+12
| | | | llvm-svn: 78948
* Move getTrue() and getFalse() to 2.5-like APIs.Owen Anderson2009-07-311-6/+6
| | | | llvm-svn: 77685
* Move more code back to 2.5 APIs.Owen Anderson2009-07-301-1/+1
| | | | llvm-svn: 77635
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-13/+14
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-1/+1
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-9/+13
| | | | llvm-svn: 76702
* Rename getConstantInt{True|False} to get{True|False} at Chris' behest.Owen Anderson2009-07-211-6/+6
| | | | llvm-svn: 76598
* Make makeLoopInvariant report whether it made any changes or not,Dan Gohman2009-07-151-4/+1
| | | | | | and use this to simplify more code. llvm-svn: 75722
* Update LoopSimplify and LoopUnswitch to use the new makeLoopInvariantDan Gohman2009-07-141-1/+6
| | | | | | function. llvm-svn: 75584
* This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson2009-07-091-1/+1
| | | | | | the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
* Thread LLVMContext through the constant folding APIs, which touches a lot of ↵Owen Anderson2009-07-061-1/+1
| | | | | | files. llvm-svn: 74844
* Second batch of passes using LLVMContext.Owen Anderson2009-07-031-8/+9
| | | | llvm-svn: 74753
* Allow readonly functions to unwind exceptions. TeachDuncan Sands2009-05-061-2/+2
| | | | | | | | the optimizers about this. For example, a readonly function with no uses cannot be removed unless it is also marked nounwind. llvm-svn: 71071
OpenPOWER on IntegriCloud