aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/LoopInfo.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-11-13Fix typo pointed out by Trevor Harmon.Duncan Sands1-1/+1
llvm-svn: 119001
2010-10-12Begin adding static dependence information to passes, which will allow us toOwen Anderson1-1/+3
perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. llvm-svn: 116334
2010-10-07Now with fewer extraneous semicolons!Owen Anderson1-1/+1
llvm-svn: 115996
2010-09-06pull a simple method out of LICM into a new Chris Lattner1-6/+10
Loop::hasLoopInvariantOperands method. Remove a useless and confusing Loop::isLoopInvariant(Instruction) method, which didn't do what you thought it did. No functionality change. llvm-svn: 113133
2010-07-23Eliminate getCanonicalInductionVariableIncrement's last user andDan Gohman1-17/+5
eliminate it. llvm-svn: 109270
2010-07-23Simplify this code; it can use the regular CFG utlities rather thanDan Gohman1-13/+7
the BlockTraits abstractions. llvm-svn: 109268
2010-07-21Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson1-2/+1
llvm-svn: 109045
2010-07-09cache result of operator*Gabor Greif1-3/+4
llvm-svn: 107967
2010-04-15Fix a bunch of namespace polution.Dan Gohman1-2/+2
llvm-svn: 101376
2010-03-10Add a DominatorTree argument to isLCSSA so that it doesn't have toDan Gohman1-9/+2
compute a set of reachable blocks for itself each time it is called, which is fairly frequently. llvm-svn: 98179
2010-03-09Make isLCSSA ignore uses in blocks not reachable from the entry block,Dan Gohman1-3/+14
as LCSSA no longer transforms such uses. llvm-svn: 98033
2010-01-05Restore dump() methods to Loop and MachineLoop.Dan Gohman1-0/+5
llvm-svn: 92772
2009-12-18Add Loop contains utility methods for testing whether a loopDan Gohman1-1/+1
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
2009-12-11Make getUniqueExitBlocks's precondition assert more precise, toDan Gohman1-3/+3
avoid spurious failures. This fixes PR5758. llvm-svn: 91147
2009-11-20Teach getSmallConstantTripMultiple about Shl operators.Dan Gohman1-0/+5
llvm-svn: 89426
2009-11-09Minor tidiness fixes.Dan Gohman1-4/+3
llvm-svn: 86565
2009-11-05Factor out the predicate code for loopsimplify form exit blocks intoDan Gohman1-6/+8
a separate helper function. llvm-svn: 86159
2009-10-20Fix another place that calls Loop::contains a lot to construct a sortedDan Gohman1-1/+4
container of the blocks and do efficient lookups. This makes isLoopSimplifyForm much faster on large loops, fixing a significant compile-time issue in builds with assertions enabled. llvm-svn: 84673
2009-09-28Move the dominator verification code out of special code embedded withinDan Gohman1-0/+21
the PassManager code into a regular verifyAnalysis method. Also, reorganize loop verification. Make the LoopPass infrastructure call verifyLoop as needed instead of having LoopInfo::verifyAnalysis check every loop in the function after each looop pass. Add a new command-line argument, -verify-loop-info, to enable the expensive full checking. llvm-svn: 82952
2009-09-08Re-apply r80926, with fixes: keep the domtree informed of new blocksDan Gohman1-0/+10
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
2009-09-06Revert r80926. It causes loop unswitch assertion and slow down some JIT ↵Evan Cheng1-10/+0
tests significantly. llvm-svn: 81101
2009-09-03Smallvectorize switchExitBlocks.Dan Gohman1-1/+1
llvm-svn: 80942
2009-09-03Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verifyDan Gohman1-0/+10
that these passes are properly preserved. Fix several transformation passes that claimed to preserve LoopSimplify form but weren't. llvm-svn: 80926
2009-09-03Move getUniqueExitBlocks from LoopBase to Loop, since they depend onDan Gohman1-0/+68
LoopSimplify form, which is currently only available on Loops (and not MachineLoops). Also, move the code out of the header file. llvm-svn: 80923
2009-08-23remove uses of llvm/Support/Streams.h.Chris Lattner1-1/+0
llvm-svn: 79838
2009-08-23Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner1-3/+2
update all code that this affects. llvm-svn: 79830
2009-08-23eliminate the std::ostream form of WriteAsOperand and update clients.Chris Lattner1-0/+6
This also updates dominator related stuff. llvm-svn: 79825
2009-07-17Replace isTrapping with a new, similar method called Eli Friedman1-7/+2
isSafeToSpeculativelyExecute. The new method is a bit closer to what the callers actually care about in that it rejects more things callers don't want. It also adds more precise handling for integer division, and unifies code for analyzing the legality of a speculative load. llvm-svn: 76150
2009-07-16Add an isLoopSimplifyForm() predicate, following the example ofDan Gohman1-0/+24
isLCSSAForm(), to test whether a loop is in the form guaranteed by the LoopSimplify pass. llvm-svn: 76077
2009-07-15Make makeLoopInvariant report whether it made any changes or not,Dan Gohman1-4/+7
and use this to simplify more code. llvm-svn: 75722
2009-07-14Introduce a new LoopInfo utility function makeLoopInvariant, whichDan Gohman1-1/+62
works similar to isLoopInvariant, except that it will do trivial hoisting to try to make the value loop invariant if it isn't already. This makes it easier for transformation passes to clear trivial instructions out of the way (the regular LICM pass doesn't run until relatively late). This is code factored out of LoopSimplify and other places. llvm-svn: 75578
2009-07-13Move isLCSSAForm, isLoopInvariant, getCanonicalInductionVariable,Dan Gohman1-0/+178
and related functions out of LoopBase and into Loop, since they are specific to BasicBlock-based loops. This also allows the code to be moved out-of-line. llvm-svn: 75523
2009-06-27Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.Dan Gohman1-1/+1
llvm-svn: 74394
2009-06-05Remove some unnecessary #includes.Dan Gohman1-1/+0
llvm-svn: 72948
2009-05-01Change the description string of the LoopInfo pass.Dan Gohman1-1/+1
"Construction" makes it sound like a pass that might modify the CFG to construct natural loops. llvm-svn: 70580
2008-12-18Remove dead comments.Evan Cheng1-3/+0
llvm-svn: 61201
2008-05-06Remove uses of llvm/System/IncludeFile.h that are no longer needed.Dan Gohman1-3/+0
llvm-svn: 50695
2008-03-20These passes preserve CFG.Devang Patel1-1/+1
This patch fixes Benchmarks/Trimaran/enc-pc1/enc-pc1 failure reported by Grawp-PIC i386 nightly tester llvm-svn: 48623
2008-03-20Restore isCFGOnly property of various analysis passes.Devang Patel1-1/+1
llvm-svn: 48579
2008-03-19PassInfo keep tracks whether a pass is an analysis pass or not.Devang Patel1-1/+1
llvm-svn: 48554
2007-12-29Remove attribution from file headers, per discussion on llvmdev.Chris Lattner1-2/+2
llvm-svn: 45418
2007-11-27Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. ↵Owen Anderson1-1/+1
This involves a small interface change. llvm-svn: 44348
2007-11-15More templatization.Owen Anderson1-230/+1
llvm-svn: 44158
2007-11-14Start the process of making MachineLoopInfo possible by templating Loop.Owen Anderson1-396/+0
llvm-svn: 44097
2007-08-21Use SmallVector.Devang Patel1-3/+3
llvm-svn: 41230
2007-08-21No need to hardcode SmallVector size.Devang Patel1-3/+3
llvm-svn: 41228
2007-08-21Use SmallVector instead of std::vector.Devang Patel1-3/+3
llvm-svn: 41207
2007-07-19Verify loop info.Devang Patel1-1/+12
llvm-svn: 40062
2007-06-08Use DominatorTree instead of ETForest.Devang Patel1-9/+9
llvm-svn: 37507
2007-05-03Drop 'const'Devang Patel1-1/+1
llvm-svn: 36662