summaryrefslogtreecommitdiff
path: root/lib/CodeGen/BranchFolding.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-06-24 01:55:01 +0000
committerAndrew Trick <atrick@apple.com>2013-06-24 01:55:01 +0000
commitf7b5e016363b664461f33a4a391b27bea637209d (patch)
tree7257a46145f5e57cf4bda31dc08f48401278fb2f /lib/CodeGen/BranchFolding.h
parent722b0a4d293b16eebaed94ae65d5f11743cbcea5 (diff)
Fix tail merging to assign the (more) correct BasicBlock when splitting.
This makes it possible to write unit tests that are less susceptible to minor code motion, particularly copy placement. block-placement.ll covers this case with -pre-RA-sched=source which will soon be default. One incorrectly named block is already fixed, but without this fix, enabling new coalescing and scheduling would cause more failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BranchFolding.h')
-rw-r--r--lib/CodeGen/BranchFolding.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/BranchFolding.h b/lib/CodeGen/BranchFolding.h
index df795dfc248..26bdca93f79 100644
--- a/lib/CodeGen/BranchFolding.h
+++ b/lib/CodeGen/BranchFolding.h
@@ -100,13 +100,15 @@ namespace llvm {
void ReplaceTailWithBranchTo(MachineBasicBlock::iterator OldInst,
MachineBasicBlock *NewDest);
MachineBasicBlock *SplitMBBAt(MachineBasicBlock &CurMBB,
- MachineBasicBlock::iterator BBI1);
+ MachineBasicBlock::iterator BBI1,
+ const BasicBlock *BB);
unsigned ComputeSameTails(unsigned CurHash, unsigned minCommonTailLength,
MachineBasicBlock *SuccBB,
MachineBasicBlock *PredBB);
void RemoveBlocksWithHash(unsigned CurHash, MachineBasicBlock* SuccBB,
MachineBasicBlock* PredBB);
bool CreateCommonTailOnlyBlock(MachineBasicBlock *&PredBB,
+ MachineBasicBlock *SuccBB,
unsigned maxCommonTailLength,
unsigned &commonTailIndex);