summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PHIElimination.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-11-13 21:56:15 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-11-13 21:56:15 +0000
commitad205d610239538327cc1ea99df1fa972ff8c222 (patch)
tree3024d490abd206bc8e26d6b68ea94b3b151f0abf /llvm/lib/CodeGen/PHIElimination.h
parent27440e71fc2fbe0337e1554a9c0a52352f3a31d0 (diff)
downloadbcm5719-llvm-ad205d610239538327cc1ea99df1fa972ff8c222.tar.gz
bcm5719-llvm-ad205d610239538327cc1ea99df1fa972ff8c222.zip
Fix PHIElimination optimization that uses MBB->getBasicBlock.
The BasicBlock associated with a MachineBasicBlock does not necessarily correspond to the code in the MBB. Don't insert a new IR BasicBlock when splitting critical edges. We are not supposed to modify the IR during codegen, and we should be able to do just fine with a NULL BB. llvm-svn: 88707
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.h')
-rw-r--r--llvm/lib/CodeGen/PHIElimination.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.h b/llvm/lib/CodeGen/PHIElimination.h
index edc2d36670b..94716eef6c5 100644
--- a/llvm/lib/CodeGen/PHIElimination.h
+++ b/llvm/lib/CodeGen/PHIElimination.h
@@ -110,11 +110,12 @@ namespace llvm {
MachineBasicBlock *SplitCriticalEdge(MachineBasicBlock *A,
MachineBasicBlock *B);
- // FindCopyInsertPoint - Find a safe place in MBB to insert a copy from
- // SrcReg. This needs to be after any def or uses of SrcReg, but before
- // any subsequent point where control flow might jump out of the basic
- // block.
+ /// FindCopyInsertPoint - Find a safe place in MBB to insert a copy from
+ /// SrcReg when following the CFG edge to SuccMBB. This needs to be after
+ /// any def of SrcReg, but before any subsequent point where control flow
+ /// might jump out of the basic block.
MachineBasicBlock::iterator FindCopyInsertPoint(MachineBasicBlock &MBB,
+ MachineBasicBlock &SuccMBB,
unsigned SrcReg);
// SkipPHIsAndLabels - Copies need to be inserted after phi nodes and
OpenPOWER on IntegriCloud