summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Delete the FormulaSorter class and inline its one method into itsDan Gohman2010-10-071-28/+10
| | | | | | | one user. This code will be restructured soon and FormulaSorter is getting in the way. llvm-svn: 116012
* Fix a spello.Dan Gohman2010-10-071-1/+1
| | | | llvm-svn: 116011
* Charge a formula for explicit multiplies on scaled registers too,Dan Gohman2010-10-071-3/+3
| | | | | | not just base registers. llvm-svn: 116010
* Use size_t for consistency.Dan Gohman2010-10-071-1/+1
| | | | llvm-svn: 116009
* When merging one use into another, transfer the offsets fromDan Gohman2010-10-071-0/+8
| | | | | | the old use to the new one. llvm-svn: 116008
* Fix LSR to keep the RegUseTracker up to date when combining users.Dan Gohman2010-10-071-8/+19
| | | | | | | | This doesn't usually matter, because the other heuristics usually succeed regardless, but it's good to keep the register use bookkeeping consistent. llvm-svn: 116005
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* Delete an unused function.Dan Gohman2010-09-271-2/+0
| | | | llvm-svn: 114841
* do not rely on the implicit-dereference semantics of dyn_cast_or_nullGabor Greif2010-09-181-1/+1
| | | | llvm-svn: 114278
* Revert 112442 and 112440 until the compile time problems introducedDan Gohman2010-09-011-106/+50
| | | | | | by 112440 are resolved. llvm-svn: 112692
* Optionally rerun dedicated-register filtering after applyingDan Gohman2010-08-291-0/+20
| | | | | | | other filtering techniques, as those may allow it to filter out more obviously unprofitable candidates. llvm-svn: 112441
* Fix several areas in LSR to do a better job keeping the mainDan Gohman2010-08-291-50/+106
| | | | | | | | LSRInstance data structures up to date. This fixes some pessimizations caused by stale data which will be exposed in an upcoming change. llvm-svn: 112440
* Refactor the three main groups of code out ofDan Gohman2010-08-291-5/+28
| | | | | | NarrowSearchSpaceUsingHeuristics into separate functions. llvm-svn: 112439
* Delete a bogus check.Dan Gohman2010-08-291-2/+1
| | | | llvm-svn: 112438
* Add some comments.Dan Gohman2010-08-291-4/+13
| | | | llvm-svn: 112437
* Move this debug output into GenerateAllReuseFormula, to declutterDan Gohman2010-08-291-4/+4
| | | | | | the high-level logic. llvm-svn: 112436
* Delete an unused declaration.Dan Gohman2010-08-291-2/+0
| | | | llvm-svn: 112435
* Do one lookup instead of two.Dan Gohman2010-08-291-3/+4
| | | | llvm-svn: 112434
* Process the step before the start, because it's usually the simplerDan Gohman2010-08-191-3/+3
| | | | | | of the two. llvm-svn: 111495
* Instead of having CollectSubexpr's categorize operands as interesting orDan Gohman2010-08-161-19/+14
| | | | | | | | uninteresting, just put all the operands on one list and make GenerateReassociations make the decision about what's interesting. This is simpler, and it avoids an extra ScalarEvolution::getAddExpr call. llvm-svn: 111133
* Put add operands in ScalarEvolution-canonical order, when convenient.Dan Gohman2010-08-161-2/+2
| | | | | | | This isn't necessary, because ScalarEvolution sorts them anyway, but it's tidier this way. llvm-svn: 111132
* Fix LSR's ExtractImmediate and ExtractSymbol to avoid callingDan Gohman2010-08-131-4/+8
| | | | | | | ScalarEvolution::getAddExpr, which can be pretty expensive, when nothing has changed, which is pretty common. llvm-svn: 111042
* 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 whitespace.Dan Gohman2010-08-041-1/+1
| | | | llvm-svn: 110223
* Prefix `next' iterator operation with `llvm::'.Oscar Fuentes2010-08-021-3/+3
| | | | | | | | Fixes potential ambiguity problems on VS 2010. Patch by nobled! llvm-svn: 110029
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* Don't merge uses when they are targetting fixup sites withDan Gohman2010-07-151-1/+20
| | | | | | | | | | | | | different widths. In a use with a narrower fixup, formulae may be wider than the fixup, in which case the high bits aren't necessarily meaningful, so it isn't safe to reuse them for uses with wider fixups. This fixes PR7618, though the testcase is too large for a reasonable regression test, since it heavily dependes on hitting LSR's heuristics in a certain way. llvm-svn: 108455
* Use dbgs() instead of errs() in a DEBUG.Dan Gohman2010-07-151-1/+1
| | | | llvm-svn: 108453
* Watch out for a constant offset cancelling out a base register, formingDan Gohman2010-07-151-2/+9
| | | | | | | a zero. This situation arrises in Fortran code with induction variables that start at 1 instead of 0. This fixes PR7651. llvm-svn: 108424
* use getArgOperand instead of getOperandGabor Greif2010-06-301-2/+2
| | | | llvm-svn: 107270
* In GenerateReassociations, don't bother thinking about individualDan Gohman2010-06-251-8/+22
| | | | | | | | SCEVUnknown values which are loop-variant, as LSR can't do anything interesting with these values in any case. This fixes very slow compile times on loops which have large numbers of such values. llvm-svn: 106897
* A few minor micro-optimizations.Dan Gohman2010-06-241-5/+11
| | | | llvm-svn: 106764
* Teach getExactSDiv to evaluate x/1 to x up front, as it's a commonDan Gohman2010-06-241-8/+16
| | | | | | | enough special case, and it theoretically allows more folding because it works even when x is unanalyzable. llvm-svn: 106763
* Fix copy+pasto issues in isMulSExtable.Dan Gohman2010-06-241-4/+5
| | | | llvm-svn: 106759
* Fix OptimizeMax to handle an odd case where one of the max operandsDan Gohman2010-06-221-1/+4
| | | | | | is another max which folds. This fixes PR7454. llvm-svn: 106594
* Use A.append(...) instead of A.insert(A.end(), ...) when A is aDan Gohman2010-06-211-7/+6
| | | | | | SmallVector, and other SmallVector simplifications. llvm-svn: 106452
* Add a TODO comment.Dan Gohman2010-06-191-0/+2
| | | | llvm-svn: 106397
* Include the use kind along with the expression in the key of theDan Gohman2010-06-191-2/+28
| | | | | | | | | | | | use sharing map. The reconcileNewOffset logic already forces a separate use if the kinds differ, so incorporating the kind in the key means we can track more sharing opportunities. More sharing means fewer total uses to track, which means smaller problem sizes, which means the conservative throttles don't kick in as often. llvm-svn: 106396
* Don't include things in anonymous namespaces that don't need it.Dan Gohman2010-06-191-0/+4
| | | | llvm-svn: 106395
* Don't track users of undef values; they aren't interesting forDan Gohman2010-06-041-1/+5
| | | | | | register pressure. llvm-svn: 105501
* DominatorTree.getNode can return null for unreachable blocks.Dan Gohman2010-05-201-1/+1
| | | | llvm-svn: 104290
* Minor code cleanups.Dan Gohman2010-05-201-8/+7
| | | | llvm-svn: 104287
* Make Solve check its own post-condition, to reduce clutter in theDan Gohman2010-05-201-1/+2
| | | | | | top-level LSRInstance logic. llvm-svn: 104278
* Add comments.Dan Gohman2010-05-201-0/+16
| | | | llvm-svn: 104276
* More code cleanups. Use iterators instead of indices when indicesDan Gohman2010-05-201-22/+24
| | | | | | aren't needed. llvm-svn: 104273
* Fix OptimizeShadowIV to set Changed. Change OptimizeLoopTermCond to setDan Gohman2010-05-201-8/+7
| | | | | | | | | Changed directly instead of using a return value. Rename FilterOutUndesirableDedicatedRegisters's Changed variable to distinguish it from LSRInstance's Changed member. llvm-svn: 104269
* Add some comments.Dan Gohman2010-05-201-0/+6
| | | | llvm-svn: 104268
* Simplify this code. Don't do a DomTreeNode lookup for each visited block.Dan Gohman2010-05-201-14/+5
| | | | llvm-svn: 104267
OpenPOWER on IntegriCloud