summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup. Fix a stupid variable name.Andrew Trick2011-06-281-3/+3
| | | | llvm-svn: 133995
* SCEVExpander: give new insts a name that identifies the reponsible pass.Andrew Trick2011-06-281-3/+4
| | | | llvm-svn: 133992
* New binops need debug loc.Devang Patel2011-06-221-1/+3
| | | | llvm-svn: 133642
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-4/+3
| | | | | | 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-6/+8
| | | | llvm-svn: 128535
* Added SCEV::NoWrapFlags to manage unsigned, signed, and self wrapAndrew Trick2011-03-141-12/+25
| | | | | | | | | 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
* When decling to reuse existing expressions that involve casts, ignoreDan Gohman2011-03-041-1/+1
| | | | | | | bitcasts, which are really no-ops here. This fixes slowdowns on MultiSource/Applications/aha and others. llvm-svn: 127031
* Don't re-use existing addrec expansions if they contain casts.Dan Gohman2011-03-021-1/+2
| | | | | | This fixes PR9259. llvm-svn: 126812
* Introduce memoization for ScalarEvolution dominates and properlyDominatesDan Gohman2010-11-181-16/+27
| | | | | | queries, and SCEVExpander getRelevantLoop queries. llvm-svn: 119595
* Move SCEV::dominates and properlyDominates to ScalarEvolution.Dan Gohman2010-11-171-2/+2
| | | | llvm-svn: 119570
* Move SCEV::isLoopInvariant and hasComputableLoopEvolution to be memberDan Gohman2010-11-171-2/+2
| | | | | | | functions of ScalarEvolution, in preparation for memoization and other optimizations. llvm-svn: 119562
* Fix SCEVExpander::visitAddRecExpr so that it remembers the induction variableDan Gohman2010-07-261-24/+21
| | | | | | | | it inserted rather than using LoopInfo::getCanonicalInductionVariable to rediscover it, since that doesn't work on non-canonical loops. This fixes infinite recurrsion on such loops; PR7562. llvm-svn: 109419
* Simplify this code; LoopInfo::getCanonicalInductionVariable will onlyDan Gohman2010-07-201-3/+6
| | | | | | find integer induction variables. llvm-svn: 108853
* Make getOrInsertCanonicalInductionVariable guarantee that itsDan Gohman2010-07-201-2/+2
| | | | | | result is a PHINode*. llvm-svn: 108852
* Fix the order that SCEVExpander considers add operands in so thatDan Gohman2010-07-151-2/+14
| | | | | | | it doesn't miss an opportunity to form a GEP, regardless of the relative loop depths of the operands. This fixes rdar://8197217. llvm-svn: 108475
* remove useless cast and fix typos in commentGabor Greif2010-07-091-3/+3
| | | | llvm-svn: 107989
* cache result of operator*Gabor Greif2010-07-091-3/+5
| | | | llvm-svn: 107988
* cache result of operator*Gabor Greif2010-07-091-5/+7
| | | | llvm-svn: 107976
* Simplify.Dan Gohman2010-06-301-2/+1
| | | | llvm-svn: 107248
* Use A.append(...) instead of A.insert(A.end(), ...) when A is aDan Gohman2010-06-211-4/+4
| | | | | | SmallVector, and other SmallVector simplifications. llvm-svn: 106452
* Restore a call to rememberInstruction which was accidentally droppedDan Gohman2010-06-191-0/+1
| | | | | | in refactoring. llvm-svn: 106398
* Factor out duplicated code for reusing and inserting casts intoDan Gohman2010-06-191-54/+46
| | | | | | a helper function. llvm-svn: 106388
* A few more places where SCEVExpander bits need to skip over debug intrinsicsJim Grosbach2010-06-161-3/+4
| | | | | | when iterating through instructions. Yet more work for rdar://7797940 llvm-svn: 106149
* LSR needs to remember inserted instructions even in postinc mode, becauseDan Gohman2010-06-051-1/+3
| | | | | | | there could be multiple subexpressions within a single expansion which require insert point adjustment. This fixes PR7306. llvm-svn: 105510
* Use getConstant instead of getIntegerSCEV. The two are basically theDan Gohman2010-05-031-13/+13
| | | | | | same, now that getConstant has overloads consistent with ConstantInt::get. llvm-svn: 102965
* When checking whether the special handling for an addrec increment whichDan Gohman2010-04-261-2/+1
| | | | | | | | | doesn't dominate the header is needed, don't check whether the increment expression has computable loop evolution. While the operands of an addrec are required to be loop-invariant, they're not required to dominate any part of the loop. This fixes PR6914. llvm-svn: 102389
* Fix a bunch of namespace polution.Dan Gohman2010-04-151-0/+4
| | | | llvm-svn: 101376
* When emitting code for an add, don't force a SCEVUnknown wrapper aroundDan Gohman2010-04-091-3/+4
| | | | | | | a hoisted intermediate result if the intermediate result isn't an Instruction. llvm-svn: 100884
* Add a comment.Dan Gohman2010-04-091-1/+2
| | | | llvm-svn: 100874
* Generalize IVUsers to track arbitrary expressions rather than expressionsDan Gohman2010-04-071-7/+10
| | | | | | | | | | | | | | | explicitly split into stride-and-offset pairs. Also, add the ability to track multiple post-increment loops on the same expression. This refines the concept of "normalizing" SCEV expressions used for to post-increment uses, and introduces a dedicated utility routine for normalizing and denormalizing expressions. This fixes the expansion of expressions which are post-increment users of more than one loop at a time. More broadly, this takes LSR another step closer to being able to reason about more than one loop at a time. llvm-svn: 100699
* Don't back past debug info intrinsics; SCEVExpander's strategyDan Gohman2010-03-231-12/+1
| | | | | | | for ignoring debug info intrinsics everywhere else is to advance past them, and it needs to be consistent. llvm-svn: 99332
* Fix more places to more thoroughly ignore debug intrinsics. This fixesDan Gohman2010-03-191-5/+13
| | | | | | | | use-before-def errors in SCEVExpander-produced code in sqlite3 when debug info with optimization is enabled, though the testcases for this are dependent on use-list order. llvm-svn: 99001
* Reapply r98755 with a thinko which miscompiled gengtype fixed.Dan Gohman2010-03-181-18/+10
| | | | llvm-svn: 98793
* Revert 98755, which may be causing trouble.Dan Gohman2010-03-171-10/+18
| | | | llvm-svn: 98762
* Change SCEVNAryExpr's operand array from a SmallVector to a plainDan Gohman2010-03-171-18/+10
| | | | | | | | | | pointer and length, and allocate the arrays in ScalarEvolution's BumpPtrAllocator, so that they get released when their owning SCEV gets released. SCEVs are immutable, so they don't need to worry about operand array resizing. This fixes a memory leak reported in PR6637. llvm-svn: 98755
* Another place where debug info affected codegen.Dale Johannesen2010-03-091-0/+2
| | | | llvm-svn: 98026
* Fix another case where LSR was affected by debug info.Dale Johannesen2010-03-061-1/+12
| | | | llvm-svn: 97865
* Fix a case where LSR is sensitive to debug info.Dale Johannesen2010-03-051-0/+9
| | | | llvm-svn: 97830
* Make SCEVExpander and LSR more aggressive about hoisting expressions outDan Gohman2010-03-031-47/+224
| | | | | | of loops. llvm-svn: 97642
* Revert r97580; that's not the right way to fix this.Dan Gohman2010-03-031-121/+31
| | | | llvm-svn: 97639
* When expanding an expression such as (A + B + C + D), sort the operandsDan Gohman2010-03-021-31/+121
| | | | | | | by loop depth and emit loop-invariant subexpressions outside of loops. This speeds up MultiSource/Applications/viterbi and others. llvm-svn: 97580
* Non-affine post-inc SCEV expansions have more code which must beDan Gohman2010-03-021-1/+1
| | | | | | | emitted after the increment. Make sure the insert position reflects this. This fixes PR6453. llvm-svn: 97537
* Spelling fixes.Dan Gohman2010-03-011-4/+4
| | | | llvm-svn: 97453
* Fix SCEVExpander's existing PHI reuse checking to recognize theDan Gohman2010-02-171-0/+13
| | | | | | | | case where there are loop-invariant instructions somehow left inside the loop, and in a position where they won't dominate the IV increment position. llvm-svn: 96448
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-3/+3
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* When reusing an existing PHI node in a loop, be even moreDan Gohman2010-02-161-11/+39
| | | | | | strict about the requirements. llvm-svn: 96301
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-1/+1
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* When restoring a saved insert location, check to see if the savedDan Gohman2010-02-151-4/+12
| | | | | | | insert location has become an "inserted" instruction since the time it was saved. If so, advance to the first non-"inserted" instruction. llvm-svn: 96203
* In rememberInstruction, if the value being remembered is theDan Gohman2010-02-141-0/+14
| | | | | | | | | current insertion point, advance the current insertion point. This avoids a use-before-def situation in a testcase extracted from clang which is difficult to reduce to a reasonable-sized regression test. llvm-svn: 96151
* Fix a case of mismatched types in an Add that turned up in 447.dealII.Dan Gohman2010-02-121-0/+2
| | | | llvm-svn: 96007
OpenPOWER on IntegriCloud