aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/TailDuplication.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reuse operand location when updating PHI instructions.Jakob Stoklund Olesen2010-02-111-7/+26
| | | | | | | | Calling RemoveOperand is very expensive on huge PHI instructions. This makes early tail duplication run twice as fast on the Firefox JavaScript interpreter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95832 91177308-0d34-0410-b5e6-96231b3b80d8
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-091-5/+5
| | | | | | | | | | into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
* Treat indirect branches specially only during pre-regalloc tail duplication,Bob Wilson2010-01-161-13/+13
| | | | | | | not during the later post-alloc tail duplication. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93600 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify logic. Any functional change is unintended.Jakob Stoklund Olesen2010-01-151-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93540 91177308-0d34-0410-b5e6-96231b3b80d8
* Change pre-regalloc tail duplication to only duplicate indirect branch blocks.Bob Wilson2010-01-151-4/+11
| | | | | | | | | | The pre-regalloc pass caused some regressions in both compile time and performance of the generated code, and it did not improve performance, except for indirect branches. I also moved the check for single-block loops to speed up the common case when running the taildup pass before reg allocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93505 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Target hook to duplicate machine instructions.Jakob Stoklund Olesen2010-01-061-1/+1
| | | | | | | Some instructions refer to unique labels, and so cannot be trivially cloned with CloneMachineInstr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92873 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-11/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92582 91177308-0d34-0410-b5e6-96231b3b80d8
* Tail duplication should zap a copy it inserted for SSA update if the copy is ↵Evan Cheng2009-12-151-13/+37
| | | | | | the only use of its source. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91390 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete code accidentally left behind.Evan Cheng2009-12-071-10/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90804 91177308-0d34-0410-b5e6-96231b3b80d8
* Pre-regalloc tale duplication. Work in progress.Evan Cheng2009-12-071-90/+220
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90759 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle recursive PHI's.Evan Cheng2009-12-041-18/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90575 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a pre-regalloc tail duplication pass.Evan Cheng2009-12-041-98/+215
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90567 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach tail duplication to update SSA form. Work in progress.Evan Cheng2009-12-031-3/+134
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90432 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't count PHI instructions toward the limit for tail duplicating a block.Bob Wilson2009-12-021-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90326 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90147 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove isProfitableToDuplicateIndirectBranch target hook. It is profitableBob Wilson2009-11-301-2/+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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90144 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename new TailDuplicationPass to avoid name conflict with the old one.Bob Wilson2009-11-261-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89968 91177308-0d34-0410-b5e6-96231b3b80d8
* Split tail duplication into a separate pass. This is needed to avoidBob Wilson2009-11-261-0/+250
running tail duplication when doing branch folding for if-conversion, and we also want to be able to run tail duplication earlier to fix some reg alloc problems. Move the CanFallThrough function from BranchFolding to MachineBasicBlock so that it can be shared by TailDuplication. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89904 91177308-0d34-0410-b5e6-96231b3b80d8