aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* In the default address space, any GEP off of null results in a trap value if ↵Owen Anderson2010-08-251-4/+5
| | | | | | | | | | you try to load it. Thus, any load in the default address space that completes implies that the base value that it GEP'd from was not null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112015 91177308-0d34-0410-b5e6-96231b3b80d8
* NULL loads are only invalid in the default address space.Owen Anderson2010-08-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111972 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for inferring values for the default cases of switches.Owen Anderson2010-08-241-3/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111971 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for inferring that a load from a pointer implies that it is not ↵Owen Anderson2010-08-241-4/+17
| | | | | | null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111959 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't assume that all constants with integer types are ConstantInts.Owen Anderson2010-08-241-2/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111906 91177308-0d34-0410-b5e6-96231b3b80d8
* Let FE use derived types for DW_TAG_friend.Devang Patel2010-08-231-0/+1
| | | | | | | Patch by Alexander Herz! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111861 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle qualified constants that are directly folded by FE.Devang Patel2010-08-231-0/+10
| | | | | | | PR 7920. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111820 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that PassInfo and Pass::ID have been separated, move the rest of the ↵Owen Anderson2010-08-234-16/+12
| | | | | | passes over to the new registration API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111815 91177308-0d34-0410-b5e6-96231b3b80d8
* CreateTemporaryType doesn't needs its Context argument.Dan Gohman2010-08-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111687 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new temporary MDNode concept. Temporary MDNodes areDan Gohman2010-08-201-1/+15
| | | | | | | | | not part of the IR, are not uniqued, and may be safely RAUW'd. This replaces a variety of alternate mechanisms for achieving the same effect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111681 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert DbgInfoPrinter to use errs() instead of outs().Dan Gohman2010-08-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111659 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111199; it breaks -debug-pass=Structure output.Dan Gohman2010-08-192-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111500 91177308-0d34-0410-b5e6-96231b3b80d8
* refix PR1143 by making basicaa analyze zexts of indices aggresively,Chris Lattner2010-08-181-11/+30
| | | | | | | which I broke with a recent patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111452 91177308-0d34-0410-b5e6-96231b3b80d8
* GetLinearExpression is only called when TD is non-null, pass as Chris Lattner2010-08-181-4/+4
| | | | | | | a reference instead of pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111445 91177308-0d34-0410-b5e6-96231b3b80d8
* rework GEP decomposition to make a new VariableGEPIndex struct instead ofChris Lattner2010-08-181-19/+39
| | | | | | | | using a pair. This tidies up the code a bit. While setting things up, add a (currently unused) field to keep track of how the value is extended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111444 91177308-0d34-0410-b5e6-96231b3b80d8
* move gep decomposition out of ValueTracking into BasicAA. The form ofChris Lattner2010-08-182-223/+229
| | | | | | | | | | | decomposition that it is doing is very basicaa specific and is only used by basicaa. Now with less tree breakingness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111433 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ConstantRange to propagate information through value definitions.Owen Anderson2010-08-181-4/+83
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111425 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111375, "move gep decomposition out of ValueTracking into BasicAA. TheDaniel Dunbar2010-08-182-213/+222
| | | | | | form of", it doesn't pass tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111385 91177308-0d34-0410-b5e6-96231b3b80d8
* Inform LazyValueInfo whenever a block is deleted, to avoid dangling pointer ↵Owen Anderson2010-08-181-21/+47
| | | | | | issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111382 91177308-0d34-0410-b5e6-96231b3b80d8
* move gep decomposition out of ValueTracking into BasicAA. The form ofChris Lattner2010-08-182-222/+213
| | | | | | | | decomposition that it is doing is very basicaa specific and is only used by basicaa. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111375 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR7589: In brief:Chris Lattner2010-08-181-3/+3
| | | | | | | | | | | gep P, (zext x) != gep P, (sext x) DecomposeGEPExpression was getting this wrong, confusing basicaa. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111352 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak IVUsers' concept of "interesting" to exclude add recurrencesDan Gohman2010-08-171-12/+16
| | | | | | | | | | where the step value is an induction variable from an outer loop, to avoid trouble trying to re-expand such expressions. This effectively hides such expressions from indvars and lsr, which prevents them from getting into trouble. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111317 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix another iterator invalidation that caused a *really* nasty ↵Owen Anderson2010-08-161-6/+7
| | | | | | miscompilation in 403.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111210 91177308-0d34-0410-b5e6-96231b3b80d8
* Make dumpPassStructure be a PMDataManager abstraction, rather thanDan Gohman2010-08-162-2/+2
| | | | | | | | | | | a Pass abstraction, since that's the level it's actually used at. Rename Pass' dumpPassStructure to dumpPass. This eliminates an awkward use of getAsPass() to convert a PMDataManager* into a Pass* just to permit a dumpPassStructure call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111199 91177308-0d34-0410-b5e6-96231b3b80d8
* To create a copy of a SmallVector with an element removed from theDan Gohman2010-08-161-6/+7
| | | | | | | | | | middle, copy the elements in two groups, rather than copying all the elements and then doing an erase on the middle of the result. These are SmallVectors, so we shouldn't expect to hit dynamic allocation in the common case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111151 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy whitespace.Dan Gohman2010-08-161-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111147 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Dan Gohman2010-08-161-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111145 91177308-0d34-0410-b5e6-96231b3b80d8
* Use const_iterator in a few places.Dan Gohman2010-08-161-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111144 91177308-0d34-0410-b5e6-96231b3b80d8
* Use iterators instead of indices in a few more places.Dan Gohman2010-08-161-6/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111143 91177308-0d34-0410-b5e6-96231b3b80d8
* Micro-optimize SCEVConstant comparison.Dan Gohman2010-08-161-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111142 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SCEVNAryExpr's virtual member functions out of line, and convertDan Gohman2010-08-161-0/+33
| | | | | | | them to iterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111140 91177308-0d34-0410-b5e6-96231b3b80d8
* Use iterators instead of indices in simple cases.Dan Gohman2010-08-161-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111138 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid gratuitous inefficiency in ifndef NDEBUG code.Dan Gohman2010-08-161-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111137 91177308-0d34-0410-b5e6-96231b3b80d8
* Make one getAddExpr call when analyzing a+b+c+d+e+... instead of oneDan Gohman2010-08-161-6/+31
| | | | | | | for each add instruction. Ditto for Mul. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111136 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete an unused function.Dan Gohman2010-08-161-35/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111135 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111058, the lint check for indirectbr successors that aren'tDan Gohman2010-08-161-6/+0
| | | | | | | | address-taken. This can occur normally, if the code which took the address got DCEd. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111121 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111082. No warnings for this common pattern.Argyrios Kyrtzidis2010-08-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111102 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.Argyrios Kyrtzidis2010-08-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111082 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a lint check for an indirectbr destination which has notDan Gohman2010-08-131-0/+6
| | | | | | | had its address taken. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111058 91177308-0d34-0410-b5e6-96231b3b80d8
* Various optimizations. Don't compare two loops' depthsDan Gohman2010-08-131-18/+26
| | | | | | | | when they are the same loop. Don't compare two instructions' loop depths when they are in the same block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111045 91177308-0d34-0410-b5e6-96231b3b80d8
* When testing whether one loop contains another, test this directlyDan Gohman2010-08-131-2/+2
| | | | | | | rather than testing whether the loop contains the other's header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111039 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a const.Dan Gohman2010-08-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111038 91177308-0d34-0410-b5e6-96231b3b80d8
* When creating a symmetric SCEV with a constant operand, putDan Gohman2010-08-131-4/+4
| | | | | | | | the constant operand on the left, as that's where ScalarEvolution will end up canonicalizing to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111037 91177308-0d34-0410-b5e6-96231b3b80d8
* An add recurrence is loop-invariant in any loop inside of itsDan Gohman2010-08-131-0/+4
| | | | | | | | associated loop. This avoids potentially expensive traversals of the add recurrence's operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111034 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize ScalarEvolution::getAddExpr's operand factoring code byDan Gohman2010-08-121-4/+7
| | | | | | | | | having it finish processing all of the muliply operands before starting the whole getAddExpr process over again, instead of immediately after the first simplification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110916 91177308-0d34-0410-b5e6-96231b3b80d8
* Hoist some loop-invariant code out of a hot loop.Dan Gohman2010-08-121-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110915 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize ScalarEvolution::getAddExpr's duplicate operand detectionDan Gohman2010-08-121-3/+7
| | | | | | | | | by having it finish processing the whole operand list before starting the whole getAddExpr process over again, instead of immediately after the first duplicate is found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110914 91177308-0d34-0410-b5e6-96231b3b80d8
* Even if a variable has constant value all the time, it is still a variable ↵Devang Patel2010-08-111-1/+1
| | | | | | | | | in gdb's eyes. Tested by scope.exp in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110876 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a subtle use-after-free issue.Owen Anderson2010-08-111-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110863 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LoopPass::getContainedPass return a LoopPass* instead of a Pass*Dan Gohman2010-08-111-5/+5
| | | | | | | and remove casts from all its callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110848 91177308-0d34-0410-b5e6-96231b3b80d8