summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BranchFolding.h
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-07-06 23:41:48 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-07-06 23:41:48 +0000
commitbf007364bf520a60a48c498472e2dbd76753cf08 (patch)
tree2081b32e7828684ae015c9f3448aa3fb36a7ef30 /llvm/lib/CodeGen/BranchFolding.h
parentfdc02c1b0d810f073146f4b8c72116fe15b72631 (diff)
downloadbcm5719-llvm-bf007364bf520a60a48c498472e2dbd76753cf08.tar.gz
bcm5719-llvm-bf007364bf520a60a48c498472e2dbd76753cf08.zip
When tail-merging multiple blocks, make sure to correctly update the live-in list on the merged block to correctly account for the live-outs of all the predecessors. They might not be the same in all cases (the testcase I have involves a PHI node where one of the operands is an IMPLICIT_DEF).
Unfortunately, the testcase I have is large and confidential, so I don't have a test to commit at the moment; I'll see if I can come up with something smaller where this issue reproduces. <rdar://problem/9716278> llvm-svn: 134565
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.h')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.h b/llvm/lib/CodeGen/BranchFolding.h
index 4ed42c03464..df795dfc248 100644
--- a/llvm/lib/CodeGen/BranchFolding.h
+++ b/llvm/lib/CodeGen/BranchFolding.h
@@ -95,6 +95,8 @@ namespace llvm {
bool TailMergeBlocks(MachineFunction &MF);
bool TryTailMergeBlocks(MachineBasicBlock* SuccBB,
MachineBasicBlock* PredBB);
+ void MaintainLiveIns(MachineBasicBlock *CurMBB,
+ MachineBasicBlock *NewMBB);
void ReplaceTailWithBranchTo(MachineBasicBlock::iterator OldInst,
MachineBasicBlock *NewDest);
MachineBasicBlock *SplitMBBAt(MachineBasicBlock &CurMBB,
OpenPOWER on IntegriCloud