summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TailDuplication.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach early dup how to duplicate basic blocks with one successor and only ↵Rafael Espindola2011-06-201-2/+142
| | | | | | | | phi instructions into more complex blocks. llvm-svn: 133415
* Two fixes relating to debug value:Rafael Espindola2011-06-171-0/+10
| | | | | | | | * We should change the generated code because of a debug use. * Avoid creating debug uses of undef, as they become a kill. Test to follow. llvm-svn: 133255
* Enable early duplication of small blocks. There are still improvements toRafael Espindola2011-06-171-29/+32
| | | | | | be made, but this is already a win. llvm-svn: 133240
* Removed tabs. Also fixed my editor...Rafael Espindola2011-06-101-3/+2
| | | | llvm-svn: 132857
* Remove duplicated test.Rafael Espindola2011-06-101-4/+3
| | | | | | Thanks Bob Wilson for noticing it! llvm-svn: 132851
* Make the optional verification step more strict.Rafael Espindola2011-06-091-1/+8
| | | | llvm-svn: 132822
* Avoid a gcc warning about multiline comments.Rafael Espindola2011-06-091-6/+6
| | | | llvm-svn: 132821
* On last fix to the early tail duplication.Rafael Espindola2011-06-091-4/+60
| | | | | | | | With this I am able to bootstrap clang with early tail duplication enabled for any small bb and setting tail-dup-size to a relatively large value(8) to stress this code. llvm-svn: 132816
* Also consider phi nodes when deciding if a register is live out.Rafael Espindola2011-06-091-10/+34
| | | | llvm-svn: 132814
* AnalyzeBranch modifies the bb, but we don't want to modify a bb withRafael Espindola2011-06-091-7/+6
| | | | | | eh edges. Swap the order of the checks to avoid it. llvm-svn: 132806
* A PHI in this basic block is a use in another basic block.Rafael Espindola2011-06-091-1/+1
| | | | llvm-svn: 132805
* Refactor some checks into shouldTailDuplicate. Update comments.Rafael Espindola2011-06-091-18/+29
| | | | | | No functionality change. llvm-svn: 132798
* Fix count.Rafael Espindola2011-06-081-1/+1
| | | | llvm-svn: 132749
* Count how many phis we are creating.Rafael Espindola2011-06-081-0/+2
| | | | llvm-svn: 132748
* Update comments.Evan Cheng2011-02-041-2/+3
| | | | llvm-svn: 124843
* Respect the -tail-dup-size command line option even when optimizing for size.Jakob Stoklund Olesen2011-01-301-1/+2
| | | | | | | This is similar to the -unroll-threshold option. There should be no change in behavior when -tail-dup-size is not explicit on the llc command line. llvm-svn: 124564
* Re-apply r124518 with fix. Watch out for invalidated iterator.Evan Cheng2011-01-291-4/+7
| | | | llvm-svn: 124526
* Revert r124518. It broke Linux self-host.Evan Cheng2011-01-291-7/+4
| | | | llvm-svn: 124522
* Re-commit r124462 with fixes. Tail recursion elim will now dup ret into ↵Evan Cheng2011-01-291-4/+7
| | | | | | unconditional predecessor to enable TCE on demand. llvm-svn: 124518
* Revert r124462. There are a few big regressions that I need to fix first.Evan Cheng2011-01-281-7/+4
| | | | llvm-svn: 124478
* - Stop simplifycfg from duplicating "ret" instructions into unconditionalEvan Cheng2011-01-281-4/+7
| | | | | | | | branches. PR8575, rdar://5134905, rdar://8911460. - Allow codegen tail duplication to dup small return blocks after register allocation is done. llvm-svn: 124462
* Simplify a bunch of isVirtualRegister() and isPhysicalRegister() logic.Jakob Stoklund Olesen2011-01-101-1/+1
| | | | | | | | These functions not longer assert when passed 0, but simply return false instead. No functional change intended. llvm-svn: 123155
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Remove many calls to TII::isMoveInstr. Targets should be producing COPY anyway.Jakob Stoklund Olesen2010-07-161-8/+9
| | | | | | TII::isMoveInstr is going tobe completely removed. llvm-svn: 108507
* Replace copyRegToReg with COPY everywhere in lib/CodeGen except for FastISel.Jakob Stoklund Olesen2010-07-101-10/+8
| | | | llvm-svn: 108062
* Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that itDan Gohman2010-05-061-2/+2
| | | | | | doesn't have to guess. llvm-svn: 103194
* Ignore debug value instructions while analyzing BB for tail duplication.Devang Patel2010-03-161-1/+1
| | | | llvm-svn: 98675
* eliminate InvalidateLabel and LabelIDList from MMI and replaceChris Lattner2010-03-141-11/+0
| | | | | | them with a counter. llvm-svn: 98462
* 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. llvm-svn: 95832
* 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. llvm-svn: 95687
* Treat indirect branches specially only during pre-regalloc tail duplication,Bob Wilson2010-01-161-13/+13
| | | | | | not during the later post-alloc tail duplication. llvm-svn: 93600
* Simplify logic. Any functional change is unintended.Jakob Stoklund Olesen2010-01-151-6/+2
| | | | llvm-svn: 93540
* 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. llvm-svn: 93505
* 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. llvm-svn: 92873
* Change errs() to dbgs().David Greene2010-01-051-11/+11
| | | | llvm-svn: 92582
* 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. llvm-svn: 91390
* Delete code accidentally left behind.Evan Cheng2009-12-071-10/+0
| | | | llvm-svn: 90804
* Pre-regalloc tale duplication. Work in progress.Evan Cheng2009-12-071-90/+220
| | | | llvm-svn: 90759
* Handle recursive PHI's.Evan Cheng2009-12-041-18/+18
| | | | llvm-svn: 90575
* Add a pre-regalloc tail duplication pass.Evan Cheng2009-12-041-98/+215
| | | | llvm-svn: 90567
* Teach tail duplication to update SSA form. Work in progress.Evan Cheng2009-12-031-3/+134
| | | | llvm-svn: 90432
* Don't count PHI instructions toward the limit for tail duplicating a block.Bob Wilson2009-12-021-4/+6
| | | | llvm-svn: 90326
* 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-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. llvm-svn: 90144
* Rename new TailDuplicationPass to avoid name conflict with the old one.Bob Wilson2009-11-261-10/+10
| | | | llvm-svn: 89968
* 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. llvm-svn: 89904
OpenPOWER on IntegriCloud