summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BasicAliasAnalysis.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Introduce a symbolic constant for ~0u for use with AliasAnalysis.Dan Gohman2010-08-031-7/+8
| | | | llvm-svn: 110091
* Add INSTANTIATE_AG_PASS, which combines RegisterPass<> with ↵Owen Anderson2010-07-211-10/+6
| | | | | | RegisterAnalysisGroup<> for pass registration. llvm-svn: 109058
* Speculatively revert r108813, in an attempt to get the self-host buildbots ↵Owen Anderson2010-07-201-2/+2
| | | | | | | | working again. I don't see why this patch would cause them to fail the way they are, but none of the other intervening patches seem likely either. llvm-svn: 108818
* Reapply r108794, a fix for the failing test from last time.Owen Anderson2010-07-201-2/+2
| | | | llvm-svn: 108813
* Revert r108794, "Separate PassInfo into two classes: a constructor-freeDaniel Dunbar2010-07-201-2/+2
| | | | | | | superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is breaking teh everything. llvm-svn: 108805
* Separate PassInfo into two classes: a constructor-free superclass ↵Owen Anderson2010-07-201-2/+2
| | | | | | (StaticPassInfo) and a constructor-ful subclass (PassInfo). llvm-svn: 108794
* Minore code simplification.Dan Gohman2010-07-071-17/+15
| | | | llvm-svn: 107777
* Remove interprocedural-basic-aa and associated code. The AliasAnalysisDan Gohman2010-07-071-77/+14
| | | | | | | | | | | interface needs implementations to be consistent, so any code which wants to support different semantics must use a different interface. It's not currently worthwhile to add a new interface for this new concept. Document that AliasAnalysis doesn't support cross-function queries. llvm-svn: 107776
* Remove context sensitivity concerns from interprocedural-basic-aa, andDan Gohman2010-07-011-35/+55
| | | | | | | make it more aggressive in cases where both pointers are known to live in the same function. llvm-svn: 107420
* Fix whitespace style.Dan Gohman2010-06-291-2/+2
| | | | llvm-svn: 107175
* Use a more obvious way to avoid compiling functions which are only used when ↵Benjamin Kramer2010-06-291-3/+2
| | | | | | XDEBUG is enabled. llvm-svn: 107125
* Jump through some silly hoops to make GCC accept that a function may not alwaysChandler Carruth2010-06-291-0/+3
| | | | | | be called. llvm-svn: 107124
* Add an Intraprocedural form of BasicAliasAnalysis, which aims toDan Gohman2010-06-291-28/+110
| | | | | | | properly handles instructions and arguments defined in different functions, or across recursive function iterations. llvm-svn: 107109
* Fix Value::stripPointerCasts and BasicAA to avoid trouble onDan Gohman2010-06-281-9/+29
| | | | | | | code in unreachable blocks, which have have use-def cycles. This fixes PR7514. llvm-svn: 107071
* use ArgOperand accessorsGabor Greif2010-06-231-11/+11
| | | | llvm-svn: 106697
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-11/+11
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-11/+11
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-11/+11
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-11/+11
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-11/+11
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-11/+11
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* Pointers to zero-sized objects don't point to overlapping objects.Dan Gohman2010-04-081-0/+5
| | | | llvm-svn: 100789
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-2/+2
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* add some new methods to adjust this pointers. Not used yet.Chris Lattner2010-01-201-0/+20
| | | | llvm-svn: 94013
* move DecomposeGEPExpression out into ValueTracking.cppChris Lattner2009-11-261-158/+1
| | | | llvm-svn: 89956
* teach GetLinearExpression to be a bit more aggressive.Chris Lattner2009-11-261-1/+10
| | | | llvm-svn: 89955
* resolve a fixme. I haven't figured out how to write a testcaseChris Lattner2009-11-261-5/+4
| | | | | | to exercise this though. llvm-svn: 89954
* Teach basicaa that x|c == x+c when the c bits of x are clear. ThisChris Lattner2009-11-261-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | allows us to compile the example in readme.txt into: LBB1_1: ## %bb movl 4(%rdx,%rax), %ecx movl %ecx, %esi imull (%rdx,%rax), %esi imull %esi, %ecx movl %esi, 8(%rdx,%rax) imull %ecx, %esi movl %ecx, 12(%rdx,%rax) movl %esi, 16(%rdx,%rax) imull %ecx, %esi movl %esi, 20(%rdx,%rax) addq $16, %rax cmpq $4000, %rax jne LBB1_1 instead of: LBB1_1: movl (%rdx,%rax), %ecx imull 4(%rdx,%rax), %ecx movl %ecx, 8(%rdx,%rax) imull 4(%rdx,%rax), %ecx movl %ecx, 12(%rdx,%rax) imull 8(%rdx,%rax), %ecx movl %ecx, 16(%rdx,%rax) imull 12(%rdx,%rax), %ecx movl %ecx, 20(%rdx,%rax) addq $16, %rax cmpq $4000, %rax jne LBB1_1 GCC (4.2) doesn't seem to be able to eliminate the loads in this testcase either, it generates: L2: movl (%rdx), %eax imull 4(%rdx), %eax movl %eax, 8(%rdx) imull 4(%rdx), %eax movl %eax, 12(%rdx) imull 8(%rdx), %eax movl %eax, 16(%rdx) imull 12(%rdx), %eax movl %eax, 20(%rdx) addl $4, %ecx addq $16, %rdx cmpl $1002, %ecx jne L2 llvm-svn: 89952
* teach basicaa that A[i] != A[i+1].Chris Lattner2009-11-261-0/+32
| | | | llvm-svn: 89951
* Change the other half of aliasGEP (which handles GEP differencing) to use ↵Chris Lattner2009-11-261-466/+108
| | | | | | DecomposeGEPExpression. This dramatically simplifies and shrinks the code by eliminating the horrible CheckGEPInstructions method, fixes a miscompilation (@test3) and makes the code more aggressive. In particular, we now handle the @test4 case, which is reduced from the SmallPtrSet constructor. Missing this caused us to emit a variable length memset instead of a fixed size one. llvm-svn: 89922
* Generalize DecomposeGEPExpression to exactly handle what ↵Chris Lattner2009-11-261-30/+62
| | | | | | Value::getUnderlyingObject does (when TD is around). This allows us to avoid calling DecomposeGEPExpression unless the ultimate alias check we care about passes, speedup up BasicAA a bit. llvm-svn: 89920
* Implement a new DecomposeGEPExpression method, which decomposes a GEP into a ↵Chris Lattner2009-11-261-40/+121
| | | | | | list of scaled offsets. Use this to eliminate some previous ad-hoc code which was subtly broken (it assumed all Constant*'s were non-zero, but strange constant express could be zero). llvm-svn: 89915
* Use GEPOperator more pervasively to simplify code.Chris Lattner2009-11-261-29/+27
| | | | llvm-svn: 89914
* fix comment, thanks all :)Chris Lattner2009-11-231-1/+3
| | | | llvm-svn: 89666
* use the new isNoAlias method to simplify some code, only do an escaping ↵Chris Lattner2009-11-231-10/+13
| | | | | | | | check if we have a non-constant pointer. Constant pointers can't be local. llvm-svn: 89665
* whitespace cleanup, tidyingChris Lattner2009-11-231-16/+17
| | | | llvm-svn: 89664
* speed up BasicAA a bit by implementing a long-standing TODO.Chris Lattner2009-11-231-9/+20
| | | | llvm-svn: 89663
* add fixme for dubious code. Duncan, what do you think?Chris Lattner2009-11-221-0/+1
| | | | llvm-svn: 89602
* remove a silly condition that doesn't make a lot of sense anymore.Chris Lattner2009-11-221-5/+0
| | | | llvm-svn: 89601
* reduce indentation, no functionality change.Chris Lattner2009-11-221-85/+91
| | | | llvm-svn: 89600
* Remove the AliasAnalysis::getMustAliases method, which is dead.Chris Lattner2009-11-221-6/+0
| | | | | | | | The hasNoModRefInfoForCalls isn't worth it as a filter because basicaa provides m/r info and everything chains to it, so remove it. llvm-svn: 89599
* Extend CaptureTracking to indicate when a value is never stored, evenDan Gohman2009-11-191-10/+19
| | | | | | | | if it is not ultimately captured. Teach BasicAliasAnalysis that a local object address which does not escape and is never stored does not alias with a value resulting from a load. llvm-svn: 89398
* Teach BasicAA that a constant expression can't alias memory provably notNick Lewycky2009-11-141-1/+6
| | | | | | allocated until runtime (such as an alloca). Patch by Hans Wennborg! llvm-svn: 88760
* Default-addressspace null pointers don't alias anything. This allowsDan Gohman2009-11-091-0/+9
| | | | | | GVN to be more aggressive. Patch by Hans Wennborg! (with a comment added by me) llvm-svn: 86582
* remove a bunch of extraneous LLVMContext argumentsChris Lattner2009-11-061-22/+18
| | | | | | from various APIs, addressing PR5325. llvm-svn: 86231
* Rename MallocFreeHelper as MemoryBuiltinsVictor Hernandez2009-10-271-1/+1
| | | | llvm-svn: 85286
* Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵Victor Hernandez2009-10-261-1/+1
| | | | | | to free() llvm-svn: 85181
* Teach BasicAA how to analyze Select instructions, and make it moreDan Gohman2009-10-261-2/+76
| | | | | | aggressive on PHI instructions. llvm-svn: 85158
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-2/+2
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
OpenPOWER on IntegriCloud