summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix SCEVAddRecExpr::isLoopInvariant to test if all of its operandsDan Gohman2009-06-261-5/+15
| | | | | | are loop invariant, not just the start operand. llvm-svn: 74338
* Fix linking of llvm-ld and lli with CMake, from Xerxes RånbyDouglas Gregor2009-06-261-0/+2
| | | | llvm-svn: 74285
* Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprogramsDevang Patel2009-06-261-67/+37
| | | | | | and llvm.dbg.global_variables. llvm-svn: 74251
* Use a more correct atomic increment style. This isn't really necessary inOwen Anderson2009-06-251-2/+2
| | | | | | this case, but it should help avoid issues in the future. llvm-svn: 74178
* Make this thread-safe.Owen Anderson2009-06-241-1/+3
| | | | llvm-svn: 74129
* Get rid of a static boolean.Owen Anderson2009-06-241-2/+2
| | | | llvm-svn: 74125
* Scaffolding for LDA pass.Andreas Bolka2009-06-242-0/+48
| | | | llvm-svn: 74120
* Get rid of the global CFGOnly flag by threading a ShortNames parameters ↵Owen Anderson2009-06-241-20/+17
| | | | | | | | through the GraphViz rendering code. Update other uses in the codebase for this change. llvm-svn: 74084
* Minor whitespace cleanups.Dan Gohman2009-06-241-16/+16
| | | | llvm-svn: 74074
* Simplify [su]max(MAX, n) to MAX. This comes up in loop tripcountDan Gohman2009-06-241-2/+10
| | | | | | | | | computations in loops with multiple exits. Adjust the testcase for PR4436 so that the relevant portion isn't optimized away. llvm-svn: 74073
* Delete some orphaned comments, fix some 80-column violations,Dan Gohman2009-06-241-95/+80
| | | | | | and tidy up a few other formatting issues. llvm-svn: 74060
* Extend ScalarEvolution's multiple-exit support to compute exactDan Gohman2009-06-242-143/+163
| | | | | | | | | | | | | | | 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
* Teach GetMinSignBits about SCEVAddExprs.Dan Gohman2009-06-241-0/+32
| | | | llvm-svn: 74045
* Move the special cases for constants out of getUnknown and intoDan Gohman2009-06-241-15/+14
| | | | | | | | | createSCEV. Also, recognize UndefValue in createSCEV. Change getIntegerSCEV's comment to avoid mentioning FP types, and re-implement it in terms of getConstant instead of getUnknown. llvm-svn: 74041
* Use ScalarEvolution::getConstant instead of getUnknown to createDan Gohman2009-06-241-7/+8
| | | | | | | SCEVConstants. This cleanup is a step toward letting getUnknown be simpler. llvm-svn: 74037
* Include the maximum trip count expression in ScalarEvolution's print output.Dan Gohman2009-06-241-0/+9
| | | | llvm-svn: 74035
* Add an isAllOnesValue utility function, similar to isZero and isOne.Dan Gohman2009-06-241-0/+6
| | | | llvm-svn: 74032
* It is not a good idea to have data member's name match argument's name. In ↵Devang Patel2009-06-231-21/+21
| | | | | | fact, it is a simple receipe to waste an hour or so. llvm-svn: 74018
* Use getReturnTypeName() to print return type.Devang Patel2009-06-231-1/+1
| | | | llvm-svn: 74017
* Fix a bug in the trip-count computation with And/Or. If either of theDan Gohman2009-06-221-8/+4
| | | | | | sides is CouldNotCompute, the resulting exact count must be CouldNotCompute. llvm-svn: 73920
* Remove unneeded #include.Owen Anderson2009-06-221-1/+0
| | | | llvm-svn: 73911
* Fix a few minor issues that were exposed by the removal of SCEVHandle.Dan Gohman2009-06-221-1/+1
| | | | llvm-svn: 73910
* Fix llvm::ComputeNumSignBits to handle pointer typesDan Gohman2009-06-221-1/+5
| | | | | | conservatively correctly, instead of aborting. llvm-svn: 73908
* Remove the parent pointer from SCEV, since it did not end up being needed.Owen Anderson2009-06-221-30/+22
| | | | llvm-svn: 73907
* SCEVHandle is no more!Owen Anderson2009-06-224-311/+310
| | | | llvm-svn: 73906
* Fix some typos that Duncan noticed.Dan Gohman2009-06-221-2/+2
| | | | llvm-svn: 73903
* Banish global state from ScalarEvolution! SCEV uniquing is now done by ↵Owen Anderson2009-06-221-58/+50
| | | | | | | | | | | tables attached to the ScalarEvolution pass. This also throws out the SCEV reference counting scheme, as the the SCEVs now have a lifetime controlled by the ScalarEvolution pass. Note that SCEVHandle is now a no-op, and will be remove in a future commit. llvm-svn: 73892
* Make use of getUMinFromMismatchedTypes when computing backedge-takenDan Gohman2009-06-221-14/+14
| | | | | | | | | | | | counts for loops with multiple exits, replacing more conservative code which only handled constants. This is derived from a patch by Nick Lewycky. This also fixes llc aborts in ClamAV and others, as getUMinFromMismatchedTypes takes care of balancing the types before working with them. llvm-svn: 73884
* Add a getUMinFromMismatchedTypes helper function.Dan Gohman2009-06-221-0/+16
| | | | llvm-svn: 73883
* Factor out code for computing umin and smin for SCEV expressions intoDan Gohman2009-06-221-7/+14
| | | | | | helper functions. Based on a patch by Nick Lewycky. llvm-svn: 73869
* Teach ScalarEvolution how to analyze loops with multiple exitDan Gohman2009-06-221-27/+221
| | | | | | | | | blocks, and also exit blocks with multiple conditions (combined with (bitwise) ands and ors). It's often infeasible to compute an exact trip count in such cases, but a useful upper bound can often be found. llvm-svn: 73866
* Delete an unused variable.Dan Gohman2009-06-221-1/+0
| | | | llvm-svn: 73865
* Fix ScalarEvolution's backedge-taken count computations to check forDan Gohman2009-06-211-7/+29
| | | | | | | | overflow when computing a integer division to round up. Thanks to Nick Lewycky for noticing this! llvm-svn: 73862
* Generalize isLoopGuardedByCond's checking to consider twoDan Gohman2009-06-201-3/+27
| | | | | | | | | | SCEVUnknowns with identical Instructions to be equal. This allows it to analze cases such as the attached testcase, where the front-end has cloned the loop controlling expression. Along with r73805, this lets IndVarSimplify eliminate all the sign-extend casts in the loop in the attached testcase. llvm-svn: 73807
* Use ScalarEvolution's new GetMinSignBits and GetMinLeadingZerosDan Gohman2009-06-201-3/+6
| | | | | | | in the loop backedge-taken count computation of the maximum possible trip count. llvm-svn: 73805
* Make GetMinTrailingZeros a member function of ScalarEvolution,Dan Gohman2009-06-191-22/+83
| | | | | | | | | | | so that it can access the TargetData member (when available) and use ValueTracking.h information to compute information for SCEVUnknown Values. Also add GetMinLeadingZeros and GetMinSignBits functions, with minimal implementations. llvm-svn: 73794
* Make ScalarEvolution::print print getSCEVAtScope values forDan Gohman2009-06-191-2/+10
| | | | | | expressions, when interesting. llvm-svn: 73776
* Don't (unconditionally) use getSCEVAtScope to simplify the stepDan Gohman2009-06-191-1/+0
| | | | | | | | expression in IVUsers, because in the case of a use of a non-linear addrec outside of a loop, this causes the addrec to be evaluated as a linear addrec. llvm-svn: 73774
* Add a parent pointer to SCEV, in preparation for getting rid of the global ↵Owen Anderson2009-06-181-21/+26
| | | | | | uniquing tables. No functionality change. llvm-svn: 73728
* Recognize n != 0 ? n : 1 as umax(n, 1). Previously only ULT/UGT/ULE/UGEDan Gohman2009-06-181-0/+18
| | | | | | | comparisons were recognized for umax, but instcombine canonicalizes unsigned comparisons with zero to this simpler form. llvm-svn: 73717
* Remove the code from IVUsers that attempted to handleDan Gohman2009-06-181-27/+3
| | | | | | | | | | | casted induction variables in cases where the cast isn't foldable. It ended up being a pessimization in many cases. This could be fixed, but it would require a bunch of complicated code in IVUsers' clients. The advantages of this approach aren't visible enough to justify it at this time. llvm-svn: 73706
* Update a comment to reflect the code.Dan Gohman2009-06-181-2/+1
| | | | llvm-svn: 73704
* Fix trailing whitespace from ScalarEvolution::print.Dan Gohman2009-06-181-2/+1
| | | | llvm-svn: 73666
* Teach ScalarEvolution how to recognize another xor(and(x, C), C) case.Dan Gohman2009-06-181-4/+19
| | | | | | | If C is a single bit and the and gets analyzed as a truncate and zero-extend, the xor can be represnted as an add. llvm-svn: 73664
* Delete unnecessary braces.Dan Gohman2009-06-171-2/+1
| | | | llvm-svn: 73663
* Fix ScalarEvolution's Xor handling to not assume that an AndDan Gohman2009-06-171-3/+6
| | | | | | | that gets recognized with a SCEVZeroExtendExpr must be an And with a low-bits mask. With r73540, this is no longer the case. llvm-svn: 73594
* Instcombine's ShrinkDemandedConstant may strip bits out of constants,Dan Gohman2009-06-161-3/+18
| | | | | | | | obscuring what would otherwise be a low-bits mask. Use ComputeMaskedBits to compute what ShrinkDemandedConstant knew about to reconstruct a low-bits mask value. llvm-svn: 73540
* Support vector casts in more places, fixing a variety of assertionDan Gohman2009-06-154-18/+36
| | | | | | | | | | | | | | | failures. To support this, add some utility functions to Type to help support vector/scalar-independent code. Change ConstantInt::get and ConstantFP::get to support vector types, and add an overload to ConstantInt::get that uses a static IntegerType type, for convenience. Introduce a new getConstant method for ScalarEvolution, to simplify common use cases. llvm-svn: 73431
* Code cleanups. getSCEVAtScope no longer uses SCEVCouldNotCompute.Dan Gohman2009-06-151-9/+9
| | | | llvm-svn: 73401
* Fix old-style type names in comments.Dan Gohman2009-06-141-1/+1
| | | | llvm-svn: 73362
OpenPOWER on IntegriCloud