summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* rename some variables.Chris Lattner2009-12-011-13/+13
| | | | llvm-svn: 90258
* tidyChris Lattner2009-12-011-1/+3
| | | | llvm-svn: 90257
* fix 255.vortex again, third time's the charm.Chris Lattner2009-12-011-2/+35
| | | | llvm-svn: 90217
* Remove ShortNames from getNodeLabel in DOTGraphTraitsTobias Grosser2009-11-301-16/+15
| | | | llvm-svn: 90134
* Instantiate DefaultDOTGraphTraitsTobias Grosser2009-11-301-0/+10
| | | | llvm-svn: 90133
* Small PostDominatorTree improvementsTobias Grosser2009-11-301-3/+9
| | | | | | | * Do not SEGFAULT if tree entryNode() is NULL * Print function names in dotty printer llvm-svn: 90130
* Revert r90107, fixing test/Transforms/GVN/2009-11-29-ReverseMap.ll and theNick Lewycky2009-11-301-15/+2
| | | | | | llvm-gcc build. llvm-svn: 90113
* reapply r90093 with an addition of keeping the forwardChris Lattner2009-11-301-2/+15
| | | | | | | and reverse nonlocal memdep maps in synch, this should fix 255.vortex. llvm-svn: 90107
* Teach ConstantFolding to do a better job when folding gep(bitcast).Nick Lewycky2009-11-291-0/+1
| | | | | | This permits the devirtualization of llvm.org/PR3100#c9 when compiled by clang. llvm-svn: 90099
* revert this patch for now, it causes failures of:Chris Lattner2009-11-291-12/+2
| | | | | | | LLVM::Transforms/GVN/2009-02-17-LoadPRECrash.ll LLVM::Transforms/GVN/2009-06-17-InvalidPRE.ll llvm-svn: 90096
* Fix a really nasty caching bug I introduced in memdep. An entryChris Lattner2009-11-291-2/+12
| | | | | | | | | | | | was being added to the Result vector, but not being put in the cache. This means that if the cache was reused wholesale for a later query that it would be missing this entry and we'd do an incorrect load elimination. Unfortunately, it's not really possible to write a useful testcase for this, but this unbreaks 255.vortex. llvm-svn: 90093
* Detabify.Nick Lewycky2009-11-291-1/+1
| | | | llvm-svn: 90085
* Teach memdep to look for memory use intrinsics during dependency queries. FixesNick Lewycky2009-11-281-9/+30
| | | | | | PR5574. llvm-svn: 90045
* Enhance InsertPHITranslatedPointer to be able to return a list of newlyChris Lattner2009-11-281-10/+13
| | | | | | inserted instructions. No functionality change until someone starts using it. llvm-svn: 90039
* implement a FIXME: limit the depth that DecomposeGEPExpression goes the sameChris Lattner2009-11-281-3/+8
| | | | | | | | | way that getUnderlyingObject does it. This fixes the 'DecomposeGEPExpression and getUnderlyingObject disagree!' assertion on sqlite3. llvm-svn: 90038
* enable code to handle un-phi-translatable cases more aggressively:Chris Lattner2009-11-281-3/+0
| | | | | | | | | | | | | | | | | if we don't have an address expression available in a predecessor, then model this as the value being clobbered at the end of the pred block instead of being modeled as a complete phi translation failure. This is important for PRE of loads because we want to see that the load is available in all but this predecessor, and complete phi translation failure results in not getting any information about predecessors. This doesn't do anything until I renable code insertion since PRE now sees that it is available in all but one predecessors, but can't insert the addressing in the predecessor that is missing it to eliminate the redundancy. llvm-svn: 90037
* Rework InsertPHITranslatedPointer to handle the recursive case, this Chris Lattner2009-11-271-29/+84
| | | | | | | fixes PR5630 and sets the stage for the next phase of goodness (testcase pending). llvm-svn: 90019
* recursively phi translate bitcast operands too, for consistency.Chris Lattner2009-11-271-21/+18
| | | | llvm-svn: 90016
* add support for recursive phi translation and phi Chris Lattner2009-11-271-10/+67
| | | | | | | | | | | | | | | | translation of add with immediate. This allows us to optimize this function: void test(int N, double* G) { long j; G[1] = 1; for (j = 1; j < N - 1; j++) G[j+1] = G[j] + G[j+1]; } to only do one load every iteration of the loop. llvm-svn: 90013
* factor some logic out of instcombine into a new SimplifyAddInst method.Chris Lattner2009-11-271-6/+35
| | | | llvm-svn: 90011
* add comment.Chris Lattner2009-11-271-1/+5
| | | | llvm-svn: 90002
* reduce nesting, no functionality change.Chris Lattner2009-11-271-50/+51
| | | | llvm-svn: 90001
* limit the recursion depth of GetLinearExpression. ThisChris Lattner2009-11-271-6/+13
| | | | | | | fixes a crash analyzing consumer-lame, which had an "%X = add %X, 1" in unreachable code. llvm-svn: 90000
* teach GVN's load PRE to insert computations of the address in predecessorsChris Lattner2009-11-271-5/+67
| | | | | | | where it is not available. It's unclear how to get this inserted computation into GVN's scalar availability sets, Owen, help? :) llvm-svn: 89997
* Fix phi translation in load PRE to agree with the phi Chris Lattner2009-11-271-4/+10
| | | | | | | translation done by memdep, and reenable gep translation again. llvm-svn: 89992
* redisable this, my bootstrap worked because it wasn't an optimized build, ↵Chris Lattner2009-11-271-0/+1
| | | | | | whoops. llvm-svn: 89991
* try again.Chris Lattner2009-11-271-7/+6
| | | | llvm-svn: 89990
* this is causing buildbot failures, disable for now.Chris Lattner2009-11-271-0/+1
| | | | llvm-svn: 89985
* teach phi translation of GEPs to simplify geps like 'gep x, 0'.Chris Lattner2009-11-271-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | This allows us to compile the example from PR5313 into: LBB1_2: ## %bb incl %ecx movb %al, (%rsi) movslq %ecx, %rax movb (%rdi,%rax), %al testb %al, %al jne LBB1_2 instead of: LBB1_2: ## %bb movslq %eax, %rcx incl %eax movb (%rdi,%rcx), %cl movb %cl, (%rsi) movslq %eax, %rcx cmpb $0, (%rdi,%rcx) jne LBB1_2 llvm-svn: 89981
* factor some instcombine simplifications for getelementptr out to a new Chris Lattner2009-11-271-0/+32
| | | | | | SimplifyGEPInst method in InstructionSimplify.h. No functionality change. llvm-svn: 89980
* teach memdep to do trivial PHI translation of GEPs. More toChris Lattner2009-11-271-1/+42
| | | | | | come. llvm-svn: 89979
* Teach memdep to phi translate bitcasts. This allows us to compileChris Lattner2009-11-261-3/+27
| | | | | | | | | | | | | | | | | | | | | | | the example in GCC PR16799 to: LBB1_2: ## %bb1 movl %eax, %eax subq %rax, %rdi movq %rdi, (%rcx) movl (%rdi), %eax testl %eax, %eax je LBB1_2 instead of: LBB1_2: ## %bb1 movl (%rdi), %ecx subq %rcx, %rdi movq %rdi, (%rax) cmpl $0, (%rdi) je LBB1_2 llvm-svn: 89978
* factor some code out into some helper functions.Chris Lattner2009-11-261-10/+36
| | | | llvm-svn: 89975
* Implement PR1143 (at -m64) by making basicaa look through extensions. WeChris Lattner2009-11-261-2/+23
| | | | | | | previously already handled it at -m32 because there were no i32->i64 extensions for addressing. llvm-svn: 89959
* fix two transposed lines duncan caught and add an explanatory comment.Chris Lattner2009-11-261-1/+4
| | | | llvm-svn: 89958
* this todo is resolved.Chris Lattner2009-11-261-1/+0
| | | | llvm-svn: 89957
* move DecomposeGEPExpression out into ValueTracking.cppChris Lattner2009-11-262-158/+155
| | | | 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
* remove some redundant bracesChris Lattner2009-11-261-4/+2
| | | | llvm-svn: 89912
* Use StringRef (again) in DebugInfo interface.Devang Patel2009-11-251-45/+51
| | | | llvm-svn: 89866
* Emit pubtypes.Devang Patel2009-11-241-0/+32
| | | | llvm-svn: 89725
* enable iv-users simplification by defaultJim Grosbach2009-11-231-7/+1
| | | | llvm-svn: 89713
* Add CreateLocation varinat that accepts MDNode (with a default value).Devang Patel2009-11-231-0/+11
| | | | llvm-svn: 89689
OpenPOWER on IntegriCloud