summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Minor whitespace fixes.Dan Gohman2009-11-302-2/+1
| | | | llvm-svn: 90166
* Fix a minor inconsistency.Dan Gohman2009-11-301-1/+1
| | | | llvm-svn: 90165
* New virtual registers created for spill intervals should inherit allocation ↵Jakob Stoklund Olesen2009-11-301-0/+6
| | | | | | | | | | | | | | | | | | | hints from the original register. This helps us avoid silly copies when rematting values that are copied to a physical register: leaq _.str44(%rip), %rcx movq %rcx, %rsi call _strcmp becomes: leaq _.str44(%rip), %rsi call _strcmp The coalescer will not touch the movq because that would tie down the physical register. llvm-svn: 90163
* Reprioritize tests for tail duplication to be aggressive about indirectBob Wilson2009-11-301-3/+3
| | | | | | | | branches even when optimizing for code size. Unless we find evidence to the contrary in the future, the special treatment for indirect branches does not have a significant effect on code size, and performance still matters with -Os. llvm-svn: 90147
* Remove isProfitableToDuplicateIndirectBranch target hook. It is profitableBob Wilson2009-11-307-21/+1
| | | | | | | | | for all the processors where I have tried it, and even when it might not help performance, the cost is quite low. The opportunities for duplicating indirect branches are limited by other factors so code size does not change much due to tail duplicating indirect branches aggressively. llvm-svn: 90144
* Fix some more ARM unified syntax warnings.Bob Wilson2009-11-301-4/+4
| | | | llvm-svn: 90141
* Fix last DOTGraphTraits problems in CompilationGraph.Tobias Grosser2009-11-302-1/+2
| | | | llvm-svn: 90136
* Remove forgotten ShortNames in Trie and CompilationGraphTobias Grosser2009-11-301-2/+1
| | | | llvm-svn: 90135
* Remove ShortNames from getNodeLabel in DOTGraphTraitsTobias Grosser2009-11-304-39/+35
| | | | llvm-svn: 90134
* Instantiate DefaultDOTGraphTraitsTobias Grosser2009-11-304-2/+21
| | | | 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
* Added support to allow clients to custom widen. For X86, custom widen ↵Mon P Wang2009-11-306-56/+113
| | | | | | | | | vectors for divide/remainder since these operations can trap by unroll them and adding undefs for the resulting vector. llvm-svn: 90108
* 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 r90089 for now, it's breaking selfhost.Benjamin Kramer2009-11-291-3/+5
| | | | llvm-svn: 90097
* 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
* Fix two FIXMEs.Benjamin Kramer2009-11-291-5/+3
| | | | llvm-svn: 90089
* Detabify.Nick Lewycky2009-11-291-1/+1
| | | | llvm-svn: 90085
* Remove dead returns.Benjamin Kramer2009-11-291-2/+0
| | | | llvm-svn: 90083
* This patch ensures that Path::GetMainExecutable is able to handle theKovarththanan Rajaratnam2009-11-291-2/+6
| | | | | | | | | case where realpath() fails. When this occurs we segfault trying to create a std::string from a NULL pointer. Fixes PR5635. llvm-svn: 90082
* add testcases for the foo_with_overflow op xforms added recently andChris Lattner2009-11-291-12/+15
| | | | | | fix bugs exposed by the tests. Testcases from Alastair Lynn! llvm-svn: 90056
* update and consolidate the load pre notes.Chris Lattner2009-11-291-43/+42
| | | | llvm-svn: 90050
* Implement PR5634.Chris Lattner2009-11-291-10/+54
| | | | llvm-svn: 90046
* Teach memdep to look for memory use intrinsics during dependency queries. FixesNick Lewycky2009-11-281-9/+30
| | | | | | PR5574. llvm-svn: 90045
* reenable load address insertion in load pre. This allows us toChris Lattner2009-11-281-11/+19
| | | | | | | | | | | | | handle cases like this: void test(int N, double* G) { long j; for (j = 1; j < N - 1; j++) G[j+1] = G[j] + G[j+1]; } where G[1] isn't live into the loop. llvm-svn: 90041
* Enhance InsertPHITranslatedPointer to be able to return a list of newlyChris Lattner2009-11-282-11/+16
| | | | | | 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
* disable value insertion for now, I need to figure out howChris Lattner2009-11-271-1/+7
| | | | | | | to inform GVN about the newly inserted values. This fixes PR5631. llvm-svn: 90022
* Rework InsertPHITranslatedPointer to handle the recursive case, this Chris Lattner2009-11-272-53/+98
| | | | | | | 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
* Oops! Fix bug introduced in my recent cleanup change. Thanks to Tobias GrosserNick Lewycky2009-11-271-1/+1
| | | | | | for pointing this out. llvm-svn: 90015
* 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-272-17/+42
| | | | llvm-svn: 90011
* add a deadargelim note.Chris Lattner2009-11-271-0/+23
| | | | llvm-svn: 90009
* This testcase is actually only partially redundant, and requiresChris Lattner2009-11-271-2/+2
| | | | | | the FIXME I added yesterday to be implemented. llvm-svn: 90008
* fix PR5436 by making the 'simple' case of SRoA not promote out of range Chris Lattner2009-11-271-8/+34
| | | | | | | | | | array indexes. The "complex" case of SRoA still handles them, and correctly. This fixes a weirdness where we'd correctly avoid transforming A[0][42] if the 42 was too large, but we'd only do it if it was one gep, not two separate ones. llvm-svn: 90007
* 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-272-23/+93
| | | | | | | 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-272-6/+18
| | | | | | | 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
* this (and probably several others) are now done.Chris Lattner2009-11-271-33/+0
| | | | llvm-svn: 89982
* 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-272-10/+41
| | | | | | SimplifyGEPInst method in InstructionSimplify.h. No functionality change. llvm-svn: 89980
OpenPOWER on IntegriCloud