summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-2/+2
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Reapply r129401 with patch for clang.Bill Wendling2011-04-131-3/+0
| | | | llvm-svn: 129419
* Revert r129401 for now. Clang is using the old way of doing things.Bill Wendling2011-04-121-0/+3
| | | | llvm-svn: 129403
* Remove the unaligned load intrinsics in favor of using native unaligned loads.Bill Wendling2011-04-121-3/+0
| | | | | | | | | Now that we have a first-class way to represent unaligned loads, the unaligned load intrinsics are superfluous. First part of <rdar://problem/8460511>. llvm-svn: 129401
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-2/+1
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
* (Almost) always call reserveOperandSpace() on newly created PHINodes.Jay Foad2011-03-301-0/+1
| | | | llvm-svn: 128535
* Added SCEV::NoWrapFlags to manage unsigned, signed, and self wrapAndrew Trick2011-03-141-6/+16
| | | | | | | | | properties. Added the self-wrap flag for SCEV::AddRecExpr. A slew of temporary FIXMEs indicate the intention of the no-self-wrap flag without changing behavior in this revision. llvm-svn: 127590
* If we can't avoid running loop-simplify twice for now, at least avoid runningCameron Zwarich2011-02-101-0/+3
| | | | | | iv-users twice. llvm-svn: 125318
* Revert this in an attempt to bring the builders back.Eric Christopher2011-02-101-4/+4
| | | | llvm-svn: 125257
* Turn this pass ordering:Cameron Zwarich2011-02-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Natural Loop Information Loop Pass Manager Canonicalize natural loops Scalar Evolution Analysis Loop Pass Manager Induction Variable Users Canonicalize natural loops Induction Variable Users Loop Strength Reduction into this: Scalar Evolution Analysis Loop Pass Manager Canonicalize natural loops Induction Variable Users Loop Strength Reduction This fixes <rdar://problem/8869639>. I also filed PR9184 on doing this sort of thing automatically, but it seems easier to just change the ordering of the passes if this is the only case. llvm-svn: 125254
* Don't split any loop backedges, including backedges of loops other thanDan Gohman2011-02-081-15/+17
| | | | | | | | the active loop. This is generally desirable, and it avoids trouble in situations such as the testcase in PR9123, though the failure mode depends on use-list order, so it is infeasible to test. llvm-svn: 125065
* Remove code for updating dominance frontiers and some outdated references toCameron Zwarich2011-01-181-1/+0
| | | | | | dominance and post-dominance frontiers. llvm-svn: 123725
* split dom frontier handling stuff out to its own DominanceFrontier header,Chris Lattner2011-01-021-0/+1
| | | | | | so that Dominators.h is *just* domtree. Also prune #includes a bit. llvm-svn: 122714
* Move SCEV::dominates and properlyDominates to ScalarEvolution.Dan Gohman2010-11-171-13/+11
| | | | llvm-svn: 119570
* Move SCEV::isLoopInvariant and hasComputableLoopEvolution to be memberDan Gohman2010-11-171-5/+5
| | | | | | | functions of ScalarEvolution, in preparation for memoization and other optimizations. llvm-svn: 119562
* Passes do not need to recursively initialize passes that they preserve, ifOwen Anderson2010-10-191-2/+2
| | | | | | | they do not also require them. This allows us to reduce inter-pass linkage dependencies. llvm-svn: 116854
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-1/+3
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-121-1/+9
| | | | | | | | | 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
* Filter out illegal formulae after updating offsets, not before, so thatDan Gohman2010-10-081-18/+18
| | | | | | | | | | formulae which become illegal as a result of the offset updating don't escape. This is for rdar://8529692. No testcase yet, because the given cases hit use-list ordering differences. llvm-svn: 116093
* 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
OpenPOWER on IntegriCloud