summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove strange extra semicolons.Nick Lewycky2009-03-191-1/+1
| | | | llvm-svn: 67287
* If "optimize for size" attribute is set then block non-trivial loop ↵Devang Patel2009-02-031-3/+2
| | | | | | unswitches but allow trivial loop unswitches. llvm-svn: 63670
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-281-2/+2
| | | | llvm-svn: 63198
* Undo previous patch. Devang Patel2008-12-081-3/+1
| | | | llvm-svn: 60701
* switch a couple more calls to use array_pod_sort.Chris Lattner2008-12-011-2/+3
| | | | llvm-svn: 60337
* Ignore conditions that are outside the loop.Devang Patel2008-11-031-2/+4
| | | | llvm-svn: 58631
* Change create*Pass factory functions to return Pass* instead ofDaniel Dunbar2008-10-221-1/+1
| | | | | | | | | | | LoopPass*. - Although less precise, this means they can be used in clients without RTTI (who would otherwise need to include LoopPass.h, which eventually includes things using dynamic_cast). This was the simplest solution that presented itself, but I am happy to use a better one if available. llvm-svn: 58010
* Use 0 instead of false to return a null pointer.Dan Gohman2008-10-171-1/+1
| | | | llvm-svn: 57660
* Implement function notes as function attributes. Devang Patel2008-09-261-1/+1
| | | | llvm-svn: 56716
* Large mechanical patch.Devang Patel2008-09-251-1/+1
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* Put FN_NOTE_AlwaysInline and others in FnAttr namespace.Devang Patel2008-09-241-1/+1
| | | | llvm-svn: 56527
* Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.Devang Patel2008-09-231-1/+1
| | | | | | Do not check isDeclaration() in hasNote(). It is clients' responsibility. llvm-svn: 56524
* Use parameter attribute store (soon to be renamed) forDevang Patel2008-09-231-1/+1
| | | | | | Function Notes also. Function notes are stored at index ~0. llvm-svn: 56511
OpenPOWER on IntegriCloud