aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Fix another case where LSR was affected by debug info.Dale Johannesen2010-03-061-1/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97865 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a case where LSR is sensitive to debug info.Dale Johannesen2010-03-051-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97830 91177308-0d34-0410-b5e6-96231b3b80d8
* Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.Eric Christopher2010-03-051-0/+129
| | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97793 91177308-0d34-0410-b5e6-96231b3b80d8
* fix incorrect folding of icmp with undef, PR6481.Chris Lattner2010-03-031-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97659 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SCEVExpander and LSR more aggressive about hoisting expressions outDan Gohman2010-03-031-47/+224
| | | | | | | of loops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97642 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r97580; that's not the right way to fix this.Dan Gohman2010-03-031-121/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97639 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97580 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97537 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake build.Ted Kremenek2010-03-011-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97488 91177308-0d34-0410-b5e6-96231b3b80d8
* remove anders-aa from mainline, it isn't maintained and isChris Lattner2010-03-011-2868/+0
| | | | | | | tantalyzing enough that people keep trying to use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97483 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Dan Gohman2010-03-011-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97459 91177308-0d34-0410-b5e6-96231b3b80d8
* Spelling fixes.Dan Gohman2010-03-013-20/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97453 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a missing newline in debug output.Dan Gohman2010-03-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97449 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LoopSimplify change conditional branches in loop exiting blocksDan Gohman2010-02-251-13/+28
| | | | | | | | | | | | | which branch on undef to branch on a boolean constant for the edge exiting the loop. This helps ScalarEvolution compute trip counts for loops. Teach ScalarEvolution to recognize single-value PHIs, when safe, and ForgetSymbolicName to forget such single-value PHI nodes as apprpriate in ForgetSymbolicName. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97126 91177308-0d34-0410-b5e6-96231b3b80d8
* ConstantFoldInstOperands can theoretically return null if itDan Gohman2010-02-241-2/+3
| | | | | | | didn't fold anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97049 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify this code; these casts aren't necessary.Dan Gohman2010-02-241-12/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97048 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert a few more backedge-taken count functions to use BackedgeTakenInfo.Dan Gohman2010-02-241-14/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97042 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r97010, the speculative revert failed.Daniel Dunbar2010-02-242-33/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97036 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert r97010, "Add an argument to PHITranslateValue to specifyDaniel Dunbar2010-02-242-29/+33
| | | | | | the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97027 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an argument to PHITranslateValue to specify the DominatorTree. If thisBob Wilson2010-02-242-33/+29
| | | | | | | | | | | | | | | | | | | | | argument is non-null, pass it along to PHITranslateSubExpr so that it can prefer using existing values that dominate the PredBB, instead of just blindly picking the first equivalent value that it finds on a uselist. Also when the DominatorTree is specified, have PHITranslateValue filter out any result that does not dominate the PredBB. This is basically just refactoring the check that used to be in GetAvailablePHITranslatedSubExpr and also in GVN. Despite my initial expectations, this change does not affect the results of GVN for any testcases that I could find, but it should help compile time. Before this change, if PHITranslateSubExpr picked a value that does not dominate, PHITranslateWithInsertion would then insert a new value, which GVN would later determine to be redundant and would replace. By picking a good value to begin with, we save GVN the extra work of inserting and then replacing a new value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97010 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the code which constant-folded ptrtoint(inttoptr(x)+c) toDan Gohman2010-02-231-37/+5
| | | | | | | | | | | | getelementptr. Despite only doing so in the case where x is a known array object and c can be converted to an index within range, this could still be invalid if c is actually the address of an object allocated outside of LLVM. Also, SCEVExpander, the original motivation for this code, has since been improved to avoid inttoptr+ptroint in more cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96950 91177308-0d34-0410-b5e6-96231b3b80d8
* Canonicalize ConstantInts to the right operand of commutativeDan Gohman2010-02-221-2/+2
| | | | | | | | | | | operators. The test difference is just due to the multiplication operands being commuted (and thus requiring a more elaborate match). In optimized code, that expression would be folded. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96816 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor formatting cleanup.Dan Gohman2010-02-221-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96808 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused variables and parameters.Dan Gohman2010-02-222-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96780 91177308-0d34-0410-b5e6-96231b3b80d8
* Constant-fold certain comparisons with infinity and negative infinity.Dan Gohman2010-02-221-0/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96777 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Dan Gohman2010-02-191-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96688 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach ScalarEvolution how to compute a tripcount for a loop withDan Gohman2010-02-191-0/+13
| | | | | | | | | true or false as its exit condition. These are usually eliminated by SimplifyCFG, but the may be left around during a pass which wishes to preserve the CFG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96683 91177308-0d34-0410-b5e6-96231b3b80d8
* recommit 96626, evidence that it broke things appearsDale Johannesen2010-02-191-0/+29
| | | | | | | | to be spurious git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96662 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 96626, which causes build failure on ppc Darwin.Dale Johannesen2010-02-191-29/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96653 91177308-0d34-0410-b5e6-96231b3b80d8
* Indvars needs to explicitly notify ScalarEvolution when it is replacingDan Gohman2010-02-181-0/+29
| | | | | | | | | a loop exit value, so that if a loop gets deleted, ScalarEvolution isn't stick holding on to dangling SCEVAddRecExprs for that loop. This fixes PR6339. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96626 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96448 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold bswap(undef) to undef.Dan Gohman2010-02-171-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96432 91177308-0d34-0410-b5e6-96231b3b80d8
* Use line and column number to distinguish two lexical blocks at the same level.Devang Patel2010-02-161-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96395 91177308-0d34-0410-b5e6-96231b3b80d8
* Split critical edges as needed for load PRE.Bob Wilson2010-02-161-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96378 91177308-0d34-0410-b5e6-96231b3b80d8
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-1613-84/+84
| | | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
* When reusing an existing PHI node in a loop, be even moreDan Gohman2010-02-161-11/+39
| | | | | | | strict about the requirements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96301 91177308-0d34-0410-b5e6-96231b3b80d8
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-154-35/+35
| | | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
* When testing whether a given SCEV depends on a temporary symbolicDan Gohman2010-02-151-1/+1
| | | | | | | | | name, test whether the SCEV itself is that temporary symbolic name, in addition to checking whether the symbolic name appears as a possibly-indirect operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96216 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96203 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96151 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify this code; no need for a custom subclass if it doesn't needDan Gohman2010-02-141-8/+3
| | | | | | | to override anything from the parent class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96150 91177308-0d34-0410-b5e6-96231b3b80d8
* Override dominates and properlyDominates for SCEVAddRecExpr, as aDan Gohman2010-02-131-0/+15
| | | | | | | | SCEVAddRecExpr doesn't necessarily dominate blocks merely dominated by all of its operands. This fixes an abort compiling 403.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96056 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a case of mismatched types in an Add that turned up in 447.dealII.Dan Gohman2010-02-121-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96007 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply the new LoopStrengthReduction code, with compile time andDan Gohman2010-02-122-125/+90
| | | | | | | | | | | bug fixes, and with improved heuristics for analyzing foreign-loop addrecs. This change also flattens IVUsers, eliminating the stride-oriented groupings, which makes it easier to work with. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95975 91177308-0d34-0410-b5e6-96231b3b80d8
* Use an AssemblyAnnotatorWriter to clean up IVUsers' debug output.Dan Gohman2010-02-101-1/+10
| | | | | | | The "uses=" comments are just clutter in this context. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95799 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix "the the" and similar typos.Dan Gohman2010-02-104-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95781 91177308-0d34-0410-b5e6-96231b3b80d8
* Add const qualifiers.Dan Gohman2010-02-081-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95582 91177308-0d34-0410-b5e6-96231b3b80d8
* Set DW_AT_artificial only if argument is marked as artificial.Devang Patel2010-02-061-0/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95461 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CodeMetrics to count 'big' function calls explicitly.Jakob Stoklund Olesen2010-02-051-5/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95453 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the argument to getIntegerSCEV to be an int64_t, ratherDan Gohman2010-02-041-1/+1
| | | | | | | | than int. This will make it more convenient for LSR, which does a lot of things with int64_t offsets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95281 91177308-0d34-0410-b5e6-96231b3b80d8