summaryrefslogtreecommitdiff
path: root/lib/CodeGen/TailDuplication.cpp
Commit message (Collapse)AuthorAge
...
* Revert r124518. It broke Linux self-host.Evan Cheng2011-01-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124522 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-commit r124462 with fixes. Tail recursion elim will now dup ret into ↵Evan Cheng2011-01-29
| | | | | | unconditional predecessor to enable TCE on demand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124518 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r124462. There are a few big regressions that I need to fix first.Evan Cheng2011-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124478 91177308-0d34-0410-b5e6-96231b3b80d8
* - Stop simplifycfg from duplicating "ret" instructions into unconditionalEvan Cheng2011-01-28
| | | | | | | | | branches. PR8575, rdar://5134905, rdar://8911460. - Allow codegen tail duplication to dup small return blocks after register allocation is done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124462 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify a bunch of isVirtualRegister() and isPhysicalRegister() logic.Jakob Stoklund Olesen2011-01-10
| | | | | | | | These functions not longer assert when passed 0, but simply return false instead. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123155 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r110396 to fix buildbots.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-05
| | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove many calls to TII::isMoveInstr. Targets should be producing COPY anyway.Jakob Stoklund Olesen2010-07-16
| | | | | | TII::isMoveInstr is going tobe completely removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108507 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace copyRegToReg with COPY everywhere in lib/CodeGen except for FastISel.Jakob Stoklund Olesen2010-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108062 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that itDan Gohman2010-05-06
| | | | | | | doesn't have to guess. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103194 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore debug value instructions while analyzing BB for tail duplication.Devang Patel2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98675 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate InvalidateLabel and LabelIDList from MMI and replaceChris Lattner2010-03-14
| | | | | | | them with a counter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98462 91177308-0d34-0410-b5e6-96231b3b80d8
* Reuse operand location when updating PHI instructions.Jakob Stoklund Olesen2010-02-11
| | | | | | | | 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-09
| | | | | | | | | | 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-16
| | | | | | | 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-15
| | | | 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-15
| | | | | | | | | | 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-06
| | | | | | | 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-05
| | | | 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-15
| | | | | | 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-07
| | | | 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-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90759 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle recursive PHI's.Evan Cheng2009-12-04
| | | | 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-04
| | | | 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-03
| | | | 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-02
| | | | 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-30
| | | | | | | | | 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-30
| | | | | | | | | | 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-26
| | | | 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-26
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