aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo.Devang Patel2009-07-021-5/+5
| | | | | | | Thanks Duncan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74706 91177308-0d34-0410-b5e6-96231b3b80d8
* do not try to analyze bitcasts from i64 to <2 x i32> in ComputedMaskedBits. ↵Chris Lattner2009-07-021-1/+4
| | | | | | | | | | While we could do this, doing so requires adjusting the demanded mask and the code isn't doing that yet. This fixes PR4495 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74699 91177308-0d34-0410-b5e6-96231b3b80d8
* Add debug info utility routines.Devang Patel2009-07-021-0/+111
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74680 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep DIDescriptor methods together. Devang Patel2009-07-011-123/+127
| | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74652 91177308-0d34-0410-b5e6-96231b3b80d8
* Use AA to check objects before LDA.Andreas Bolka2009-07-011-15/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74647 91177308-0d34-0410-b5e6-96231b3b80d8
* improve the APIs for creating struct and function types with no ↵Chris Lattner2009-07-011-1/+1
| | | | | | | | | arguments/elements to not have to create a temporary vector (in the API at least). Patch by Jay Foad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74584 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code cleanups.Dan Gohman2009-06-301-2/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74551 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the build on Cygwin. Patch by Aaron Gray.Owen Anderson2009-06-301-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74510 91177308-0d34-0410-b5e6-96231b3b80d8
* Array accesses are independent if the underlying arrays differ.Andreas Bolka2009-06-301-0/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74499 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor formatting, whitespace, and 80-column fixes.Dan Gohman2009-06-301-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74492 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getSCEV instead of getUnknown to create a SCEV for aDan Gohman2009-06-291-3/+3
| | | | | | | | | | | Constant. This lets ConstantInts be handled as SCEVConstant instead of SCEVUnknown, as getUnknown no longer has special-case code for ConstantInt and friends. This usually doesn't affect the final output, since the constants end up getting folded later, but it does make intermediate expressions more obvious in many cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74459 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't cache PHI exit values from exhaustive evaluations, becauseDan Gohman2009-06-291-1/+0
| | | | | | | | | an individual exhaustive evaluation reflects only the exit value implied by an individual exit, which may differ from the actual exit value of the loop if there are other exits. This fixes PR4477. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74447 91177308-0d34-0410-b5e6-96231b3b80d8
* Relax LDA memory instruction checks.Andreas Bolka2009-06-291-4/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74439 91177308-0d34-0410-b5e6-96231b3b80d8
* Call doInitialization(), releaseMemory(), and doFinalization() for ↵Torok Edwin2009-06-291-0/+3
| | | | | | | | | | | on-the-fly passes as well. Also don't call finalizers for LoopPass if initialization was not called. Add a unittest that tests that these methods are called, in the proper order, and the correct number of times. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74438 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify this code, and avoid using APInt(). This fixesDan Gohman2009-06-291-4/+2
| | | | | | | | (otherwise harmless) uninitialized value warnings that Duncan found with gcc-4.4. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74437 91177308-0d34-0410-b5e6-96231b3b80d8
* Missed one.Andreas Bolka2009-06-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74416 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix case in LDA util function names.Andreas Bolka2009-06-291-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74415 91177308-0d34-0410-b5e6-96231b3b80d8
* Print pairwise dependence results, add testcases.Andreas Bolka2009-06-281-2/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74402 91177308-0d34-0410-b5e6-96231b3b80d8
* Minimal LDA interface, maximally conservative tester.Andreas Bolka2009-06-281-0/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74401 91177308-0d34-0410-b5e6-96231b3b80d8
* LDA analysis output scaffolding.Andreas Bolka2009-06-281-1/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74400 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.Dan Gohman2009-06-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74394 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert ScalarEvolution to use BumpPtrAllocator and FoldingSet, insteadDan Gohman2009-06-271-141/+222
| | | | | | | of a team of individual allocations and a team of std::maps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74393 91177308-0d34-0410-b5e6-96231b3b80d8
* Change SCEVExpander to use an IRBuilder to emit instructions.Dan Gohman2009-06-271-72/+70
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74391 91177308-0d34-0410-b5e6-96231b3b80d8
* Incorporate the insertion point into the key of SCEVExpander's CSE map.Dan Gohman2009-06-261-14/+19
| | | | | | | | | | | | | | | This helps it avoid reusing an instruction that doesn't dominate all of the users, in cases where the original instruction was inserted before all of the users were known. This may result in redundant expansions of sub-expressions that depend on loop-unpredictable values in some cases, however this isn't very common, and it primarily impacts IndVarSimplify, so GVN can be expected to clean these up. This eliminates the need for IndVarSimplify's FixUsesBeforeDefs, which fixes several bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74352 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ScalarEvolution::getAddRecExpr's code which canonicalized theDan Gohman2009-06-261-2/+23
| | | | | | | | | nesting order of nested AddRec expressions to skip the transformation if it would introduce an AddRec with operands not loop-invariant with respect to its loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74343 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix SCEVAddRecExpr::isLoopInvariant to test if all of its operandsDan Gohman2009-06-261-5/+15
| | | | | | | are loop invariant, not just the start operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74338 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix linking of llvm-ld and lli with CMake, from Xerxes RånbyDouglas Gregor2009-06-261-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74285 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprogramsDevang Patel2009-06-261-67/+37
| | | | | | | and llvm.dbg.global_variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74251 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74178 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this thread-safe.Owen Anderson2009-06-241-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74129 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of a static boolean.Owen Anderson2009-06-241-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74125 91177308-0d34-0410-b5e6-96231b3b80d8
* Scaffolding for LDA pass.Andreas Bolka2009-06-242-0/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74120 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74084 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor whitespace cleanups.Dan Gohman2009-06-241-16/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74074 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74073 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete some orphaned comments, fix some 80-column violations,Dan Gohman2009-06-241-95/+80
| | | | | | | and tidy up a few other formatting issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74060 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74048 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach GetMinSignBits about SCEVAddExprs.Dan Gohman2009-06-241-0/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74045 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74041 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ScalarEvolution::getConstant instead of getUnknown to createDan Gohman2009-06-241-7/+8
| | | | | | | | SCEVConstants. This cleanup is a step toward letting getUnknown be simpler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74037 91177308-0d34-0410-b5e6-96231b3b80d8
* Include the maximum trip count expression in ScalarEvolution's print output.Dan Gohman2009-06-241-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74035 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an isAllOnesValue utility function, similar to isZero and isOne.Dan Gohman2009-06-241-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74032 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74018 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getReturnTypeName() to print return type.Devang Patel2009-06-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74017 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73920 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded #include.Owen Anderson2009-06-221-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73911 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few minor issues that were exposed by the removal of SCEVHandle.Dan Gohman2009-06-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73910 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix llvm::ComputeNumSignBits to handle pointer typesDan Gohman2009-06-221-1/+5
| | | | | | | conservatively correctly, instead of aborting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73908 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the parent pointer from SCEV, since it did not end up being needed.Owen Anderson2009-06-221-30/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73907 91177308-0d34-0410-b5e6-96231b3b80d8
* SCEVHandle is no more!Owen Anderson2009-06-224-311/+310
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73906 91177308-0d34-0410-b5e6-96231b3b80d8