aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Port the trick to skip the check for empty buckets from StringMap to DenseMap.Benjamin Kramer2012-01-071-9/+9
| | | | | | This should fix the odd behavior that find() is slower than lookup(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147731 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some DAG combines for SUBC/SUBE. If nothing uses the carry/borrow out of ↵Craig Topper2012-01-071-2/+51
| | | | | | subc, turn it into a sub. Turn (subc x, x) into 0 with no borrow. Turn (subc x, 0) into x with no borrow. Turn (subc -1, x) into (xor x, -1) with no borrow. Turn sube with no borrow in into subc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147728 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix TableGen so that it will emit the correct signature for FastEmit_f:Cameron Zwarich2012-01-071-1/+1
| | | | | | | | | | | | | | | | | /// FastEmit_f - This method is called by target-independent code /// to request that an instruction with the given type, opcode, and /// floating-point immediate operand be emitted. virtual unsigned FastEmit_f(MVT VT, MVT RetVT, unsigned Opcode, const ConstantFP *FPImm); Currently, it emits an accidentally overloaded version without the const on the ConstantFP*. This doesn't affect anything in the tree, since nothing causes that method to be autogenerated, but I have been playing with some ARM TableGen refactorings that hit this problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147727 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize reserved register coalescing.Jakob Stoklund Olesen2012-01-071-0/+25
| | | | | | | | | | | | | | | | | Reserved registers don't have proper live ranges, their LiveInterval simply has a snippet of liveness for each def. Virtual registers with a single value that is a copy of a reserved register (typically %esp) can be coalesced with the reserved register if the live range doesn't overlap any reserved register defs. When coalescing with a reserved register, don't modify the reserved register live range. Just leave it as a bunch of dead defs. This eliminates quadratic coalescer behavior in i386 functions with many function calls. PR11699 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147726 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the 'regalloc' debug tag for most register allocator tracing.Jakob Stoklund Olesen2012-01-073-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147725 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable redundant phi elimination after LSR.Andrew Trick2012-01-071-1/+3
| | | | | | | This will be more important as we extend the LSR pass in ways that don't rely on the formula solver. In particular, we need it for constructing IV chains. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147724 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix dead linkEli Bendersky2012-01-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147721 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getRegForValue() to materialize the address of ARM globals.Jakob Stoklund Olesen2012-01-073-38/+16
| | | | | | | | | This enables basic local CSE, giving us 20% smaller code for consumer-typeset in -O0 builds. <rdar://problem/10658692> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147720 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert part of r147716. Looks like x87 instructions kill markers are all messedEvan Cheng2012-01-071-9/+11
| | | | | | | | | | | up so branch folding pass can't use the scavenger. :-( This doesn't breaks anything currently. It just means targets which do not carefully update kill markers cannot run post-ra scheduler (not new, it has always been the case). We should fix this at some point since it's really hacky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147719 91177308-0d34-0410-b5e6-96231b3b80d8
* LSR: Don't optimize loops if an outer loop has no preheader.Andrew Trick2012-01-072-4/+49
| | | | | | | | | LoopSimplify may not run on some outer loops, e.g. because of indirect branches. SCEVExpander simply cannot handle outer loops with no preheaders. Fixes rdar://10655343 SCEVExpander segfault. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147718 91177308-0d34-0410-b5e6-96231b3b80d8
* Split Finish into Finish and FinishImpl to have a common place to do end ofRafael Espindola2012-01-0716-25/+41
| | | | | | | | file error checking. Use that to error on an unfinished cfi_startproc. The error is not nice, but is already better than a segmentation fault. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147717 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a late machine instruction copy propagation pass. This catchesEvan Cheng2012-01-0713-41/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | opportunities that only present themselves after late optimizations such as tail duplication .e.g. ## BB#1: movl %eax, %ecx movl %ecx, %eax ret The register allocator also leaves some of them around (due to false dep between copies from phi-elimination, etc.) This required some changes in codegen passes. Post-ra scheduler and the pseudo-instruction expansion passes have been moved after branch folding and tail merging. They were before branch folding before because it did not always update block livein's. That's fixed now. The pass change makes independently since we want to properly schedule instructions after branch folding / tail duplication. rdar://10428165 rdar://10640363 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147716 91177308-0d34-0410-b5e6-96231b3b80d8
* Copy implicit defs (e.g. r0) when changing tBX_RET to tPOP_RET. This bug isEvan Cheng2012-01-071-0/+1
| | | | | | | | exposed with an upcoming change will would delete the copy to return register because there is no use! It's amazing anything works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147715 91177308-0d34-0410-b5e6-96231b3b80d8
* Use movw+movt in ARMFastISel::ARMMaterializeGV.Jakob Stoklund Olesen2012-01-073-43/+78
| | | | | | | | | | | | | This eliminates a lot of constant pool entries for -O0 builds of code with many global variable accesses. This speeds up -O0 codegen of consumer-typeset by 2x because the constant island pass no longer has to look at thousands of constant pool entries. <rdar://problem/10629774> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147712 91177308-0d34-0410-b5e6-96231b3b80d8
* LSR: run DeleteDeadPhis before replaceCongruentPhis.Andrew Trick2012-01-071-19/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147711 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor.Devang Patel2012-01-071-38/+45
| | | | | | | Store AsmParser info locally. A small step towards emitting match entries for multiple asm variants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147710 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup comments and argument types related to my previous ↵Andrew Trick2012-01-071-4/+5
| | | | | | replaceCongruentPhis checkin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147709 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate an error check that may not work with all asm syntax variants.Devang Patel2012-01-071-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147708 91177308-0d34-0410-b5e6-96231b3b80d8
* Extended replaceCongruentPhis to handle mixed phi types.Andrew Trick2012-01-074-18/+69
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147707 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the 'x' constraint work for AVX registers as well.Eric Christopher2012-01-072-4/+22
| | | | | | Fixes rdar://10614894 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147704 91177308-0d34-0410-b5e6-96231b3b80d8
* Missing raw_ostream.h breaks MSVC build.Andrew Trick2012-01-071-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147703 91177308-0d34-0410-b5e6-96231b3b80d8
* comment typoAndrew Trick2012-01-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147701 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose isNonConstantNegative to users of ScalarEvolution.Andrew Trick2012-01-073-20/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147700 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment.Chad Rosier2012-01-061-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147696 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment and ensure that anyone else looking at this code doesn't startEric Christopher2012-01-061-6/+5
| | | | | | to bleed from the eyes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147695 91177308-0d34-0410-b5e6-96231b3b80d8
* Use const vector references instead of a vector copy. Spotted by Devang.Eric Christopher2012-01-061-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147694 91177308-0d34-0410-b5e6-96231b3b80d8
* Use -> instead of (*iter).Eric Christopher2012-01-061-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147693 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable aligned NEON spilling by default.Jakob Stoklund Olesen2012-01-063-4/+4
| | | | | | Experiments show this to be a small speedup for modern ARM cores. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147689 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all IVUsers in the processed set. Allow querying IVUsers with ↵Andrew Trick2012-01-062-3/+10
| | | | | | isIVUserOrOperand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147686 91177308-0d34-0410-b5e6-96231b3b80d8
* Abort AdjustBBOffsetsAfter early when possible.Jakob Stoklund Olesen2012-01-061-2/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147685 91177308-0d34-0410-b5e6-96231b3b80d8
* lit/lit.TestRunner: Add an extra_substitutions argument for executeShTest --Daniel Dunbar2012-01-061-4/+7
| | | | | | useful for test suites which want to piggyback onto the "shtest" format style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147684 91177308-0d34-0410-b5e6-96231b3b80d8
* SCEVExpander: hoistStep should check strict dominance.Andrew Trick2012-01-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147683 91177308-0d34-0410-b5e6-96231b3b80d8
* Tracing to help investigate issues with SjLj spill code.Andrew Trick2012-01-061-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147682 91177308-0d34-0410-b5e6-96231b3b80d8
* Initializing to false makes better sense. Thanks, David.Chad Rosier2012-01-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147679 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix uninitialized variable warning.Chad Rosier2012-01-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147676 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix uninitialized variable warning.Chad Rosier2012-01-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147675 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a leak I noticed while reviewing the accelerator table changes. PassesEric Christopher2012-01-061-0/+5
| | | | | | | | lldb testsuite. rdar://10652330 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147673 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] cleanup: remove the SIGILL-related code (compiler part)Kostya Serebryany2012-01-061-68/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147667 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in stringEli Bendersky2012-01-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147654 91177308-0d34-0410-b5e6-96231b3b80d8
* As part of the ongoing work in finalizing the accelerator tables, extendEric Christopher2012-01-065-38/+110
| | | | | | | | | the debug type accelerator tables to contain the tag and a flag stating whether or not a compound type is a complete type. rdar://10652330 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147651 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix SpeculativelyExecuteBB to either speculate all or none of the phisDan Gohman2012-01-056-146/+203
| | | | | | | | | | | | | present in the bottom of the CFG triangle, as the transformation isn't ever valuable if the branch can't be eliminated. Also, unify some heuristics between SimplifyCFG's multiple if-converters, for consistency. This fixes rdar://10627242. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147630 91177308-0d34-0410-b5e6-96231b3b80d8
* PR11705, part 2: globalopt shouldn't put inttoptr/ptrtoint operations into ↵Eli Friedman2012-01-052-14/+35
| | | | | | global initializers if there's an implied extension or truncation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147625 91177308-0d34-0410-b5e6-96231b3b80d8
* Link symbols with different visibilities according to the rules in theRafael Espindola2012-01-053-24/+127
| | | | | | | | System V Application Binary Interface. This lets us use -fvisibility-inlines-hidden with LTO. Fixes PR11697. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147624 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r56315. When the instruction to speculate is a load, thisDan Gohman2012-01-052-27/+3
| | | | | | | | | code can incorrectly move the load across a store. This never happens in practice today, but only because the current heuristics accidentally preclude it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147623 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill ObjectCodeEmitter and BinaryObject, they were unused and superseded by MC.Benjamin Kramer2012-01-054-666/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147618 91177308-0d34-0410-b5e6-96231b3b80d8
* SCCCaptured is trivially false on entry to this loop and not modified inside it.Nick Lewycky2012-01-051-1/+1
| | | | | | | Eliminate the dead test for it on each loop iteration. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147616 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the old ELF writer.Rafael Espindola2012-01-0510-2223/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147615 91177308-0d34-0410-b5e6-96231b3b80d8
* A small re-factored JIT/MCJIT::getPointerToNamedFunction(), so it could be ↵Danil Malyshev2012-01-054-4/+21
| | | | | | called with the base class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147610 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r147542 after comments from Joerg SonnenbergerSebastian Pop2012-01-0514-59/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147608 91177308-0d34-0410-b5e6-96231b3b80d8
* allow clients of SmallSet to specify their own comparison function for the set.Chris Lattner2012-01-051-2/+2
| | | | | | | Patch by Stepan Dyatkovskiy! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147607 91177308-0d34-0410-b5e6-96231b3b80d8