aboutsummaryrefslogtreecommitdiffstats
path: root/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
commita38cfb2fceb266bd78164021c08284dc59a1e8a3 (patch)
tree13b80d12f19b28d8a08957a769e6c6cfeac8814e /lib/CodeGen/BranchFolding.h
parent66c9ee7e6d7072a5ecc0131b9dd78a20e72cb597 (diff)
downloadexternal_llvm-a38cfb2fceb266bd78164021c08284dc59a1e8a3.zip
external_llvm-a38cfb2fceb266bd78164021c08284dc59a1e8a3.tar.gz
external_llvm-a38cfb2fceb266bd78164021c08284dc59a1e8a3.tar.bz2
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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BranchFolding.h')
-rw-r--r--lib/CodeGen/BranchFolding.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/BranchFolding.h b/lib/CodeGen/BranchFolding.h
index 4ed42c0..df795df 100644
--- a/lib/CodeGen/BranchFolding.h
+++ b/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,