Split tail duplication into a separate pass. This is needed to avoid

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
This commit is contained in:
Bob Wilson
2009-11-26 00:32:21 +00:00
parent 36ccdd49f5
commit 15acadde5f
8 changed files with 320 additions and 239 deletions

View File

@@ -129,6 +129,10 @@ namespace llvm {
/// branches.
FunctionPass *createBranchFoldingPass(bool DefaultEnableTailMerge);
/// TailDuplication Pass - Duplicate blocks with unconditional branches
/// into tails of their predecessors.
FunctionPass *createTailDuplicationPass();
/// IfConverter Pass - This pass performs machine code if conversion.
FunctionPass *createIfConverterPass();