summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert 91280-91283, 91286-91289, 91291, 91293, 91295-91296. It apparently ↵Evan Cheng2009-12-171-30/+70
| | | | | | introduced a non-deterministic behavior in the optimizer somewhere. llvm-svn: 91598
* Delete an unused function.Dan Gohman2009-12-151-38/+0
| | | | llvm-svn: 91432
* Fix a thinko; isNotAlreadyContainedIn had a built-in negative, so theDan Gohman2009-12-141-1/+1
| | | | | | condition was inverted when the code was converted to contains(). llvm-svn: 91295
* Remove unnecessary #includes.Dan Gohman2009-12-141-2/+0
| | | | llvm-svn: 91293
* Instead of having a ScalarEvolution pointer member in BasedUser, just passDan Gohman2009-12-141-12/+13
| | | | | | the ScalarEvolution pointer into the functions which need it. llvm-svn: 91289
* Don't bother cleaning up if there's nothing to clean up.Dan Gohman2009-12-141-6/+6
| | | | llvm-svn: 91288
* Delete an unused variable.Dan Gohman2009-12-141-10/+1
| | | | llvm-svn: 91287
* LSR itself doesn't need LoopInfo.Dan Gohman2009-12-141-6/+2
| | | | llvm-svn: 91283
* LSR itself doesn't need DominatorTree.Dan Gohman2009-12-141-6/+2
| | | | llvm-svn: 91282
* Remove the code in LSR that manually hoists expansions out of loops;Dan Gohman2009-12-141-29/+9
| | | | | | SCEVExpander does this automatically. llvm-svn: 91281
* Minor code cleanups.Dan Gohman2009-12-141-4/+2
| | | | llvm-svn: 91280
* grammarJim Grosbach2009-11-171-2/+2
| | | | llvm-svn: 89145
* 80-column violationsJim Grosbach2009-11-171-8/+11
| | | | llvm-svn: 89123
* Generalize OptimizeLoopTermCond to optimize more loop terminating icmp to ↵Evan Cheng2009-11-171-87/+99
| | | | | | use postinc iv. llvm-svn: 89116
* Remove trailing whitespaceJim Grosbach2009-11-171-74/+74
| | | | llvm-svn: 89110
* - Teach LSR to avoid changing cmp iv stride if it will create an immediate thatEvan Cheng2009-11-121-209/+355
| | | | | | | | | | | | | | cannot be folded into target cmp instruction. - Avoid a phase ordering issue where early cmp optimization would prevent the later count-to-zero optimization. - Add missing checks which could cause LSR to reuse stride that does not have users. - Fix a bug in count-to-zero optimization code which failed to find the pre-inc iv's phi node. - Remove, tighten, loosen some incorrect checks disable valid transformations. - Quite a bit of code clean up. llvm-svn: 86969
* Block terminator may be a switch.Evan Cheng2009-11-111-1/+1
| | | | llvm-svn: 86761
* Generalize lsr code that optimize loop to count down towards zero.Evan Cheng2009-11-101-80/+126
| | | | llvm-svn: 86715
* Teach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.Dan Gohman2009-11-051-0/+1
| | | | llvm-svn: 86193
* 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
* 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
* Remove ICmpInst::isSignedPredicate which was a reimplementationNick Lewycky2009-10-251-2/+2
| | | | | | CmpInst::isSigned. llvm-svn: 85037
* Instruction::clone does not need to take an LLVMContext&. Remove that andNick Lewycky2009-09-271-3/+1
| | | | | | update all the callers. llvm-svn: 82889
* Re-apply r80926, with fixes: keep the domtree informed of new blocksDan Gohman2009-09-081-7/+8
| | | | | | | | | | | | | | | 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-8/+7
| | | | | | tests significantly. llvm-svn: 81101
* Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verifyDan Gohman2009-09-031-7/+8
| | | | | | | | | 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-4/+3
| | | | llvm-svn: 80766
* eliminate the "Value" printing methods that print to a std::ostream.Chris Lattner2009-08-231-29/+31
| | | | | | 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-7/+14
| | | | llvm-svn: 78948
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-1/+1
| | | | | | own struct type. llvm-svn: 78610
* Check for !isa<Constant> instead of isa<Instruction>. ThisDan Gohman2009-08-041-1/+1
| | | | | | | matches what the comment says, and it avoids spurious BitCast instructions for Argument values. llvm-svn: 78121
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-3/+1
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Eliminate a few unused-variable warningsDouglas Gregor2009-07-291-2/+0
| | | | llvm-svn: 77519
* Move types back to the 2.5 API.Owen Anderson2009-07-291-1/+1
| | | | llvm-svn: 77516
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-291-1/+1
| | | | llvm-svn: 77494
* Move ConstantFP construction back to the 2.5-ish API.Owen Anderson2009-07-271-4/+2
| | | | llvm-svn: 77247
* Remove Value::getName{Start,End}, the last of the old Name APIs.Daniel Dunbar2009-07-261-5/+4
| | | | llvm-svn: 77152
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-5/+3
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-9/+19
| | | | llvm-svn: 76702
* Make Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,Dan Gohman2009-07-131-1/+1
| | | | | | | | | | using the Curiously Recurring Template Pattern with LoopBase. This will help further refactoring, and future functionality for Loop. Also, Headers can now foward-declare Loop, instead of pulling in LoopInfo.h or doing tricks. llvm-svn: 75519
* This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson2009-07-091-5/+4
| | | | | | the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
* Change all SCEV* to SCEV *.Dan Gohman2009-07-071-103/+103
| | | | llvm-svn: 74918
* Second batch of passes using LLVMContext.Owen Anderson2009-07-031-8/+9
| | | | llvm-svn: 74753
* Extend ScalarEvolution's multiple-exit support to compute exactDan Gohman2009-06-241-10/+2
| | | | | | | | | | | | | | | trip counts in more cases. Generalize ScalarEvolution's isLoopGuardedByCond code to recognize And and Or conditions, splitting the code out into an isNecessaryCond helper function so that it can evaluate Ands and Ors recursively, and make SCEVExpander be much more aggressive about hoisting instructions out of loops. test/CodeGen/X86/pr3495.ll has an additional instruction now, but it appears to be due to an arbitrary register allocation difference. llvm-svn: 74048
* Don't emit a redundant BitCastInst if the value to be defined in theDan Gohman2009-06-241-1/+2
| | | | | | preheader is already an instruction. llvm-svn: 74031
* SCEVHandle is no more!Owen Anderson2009-06-221-103/+103
| | | | llvm-svn: 73906
* Rename a variable for consistency with the ExitBlock vs ExitingBlockDan Gohman2009-06-211-6/+6
| | | | | | terminology that LoopInfo uses. llvm-svn: 73863
* Fix a typo in a comment that Frits von Bommel noticed.Dan Gohman2009-06-191-1/+1
| | | | llvm-svn: 73796
* Re-apply r73718, now that the fix in r73787 is in, and add aDan Gohman2009-06-191-30/+36
| | | | | | | hand-crafted testcase which demonstrates the bug that was exposed in 254.gap. llvm-svn: 73793
* Fix LSR's OptimizeSMax to ignore max operators with more than 2 operands,Dan Gohman2009-06-191-0/+5
| | | | | | which it isn't prepared to handle. llvm-svn: 73787
OpenPOWER on IntegriCloud