summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-09-30 19:44:31 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-09-30 19:44:31 +0000
commit2622f4622c36ec9924fb908085154ffdd7174aff (patch)
tree3987040286b45e29e4e08ce1695d4ff86f611ab3 /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
parent3787a40e038d6444a1b0e93f1cdc55fb006a5392 (diff)
downloadllvm-2622f4622c36ec9924fb908085154ffdd7174aff.tar.gz
llvm-2622f4622c36ec9924fb908085154ffdd7174aff.tar.bz2
llvm-2622f4622c36ec9924fb908085154ffdd7174aff.tar.xz
When isel is emitting instructions for an x86 target without CMOV, the CFG is
edited during emission. If the basic block ends in a switch that gets lowered to a jump table, any phis at the default edge were getting updated wrong. The jump table data structure keeps a pointer to the header blocks that wasn't getting updated after the MBB is split. This bug was exposed on 32-bit Linux when disabling critical edge splitting in codegen prepare. The fix is to uipdate stale MBB pointers whenever a block is split during emission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
index 5f400e9c83..dfd1df75f1 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
@@ -398,6 +398,10 @@ public:
void LowerCallTo(ImmutableCallSite CS, SDValue Callee, bool IsTailCall,
MachineBasicBlock *LandingPad = NULL);
+ /// UpdateSplitBlock - When an MBB was split during scheduling, update the
+ /// references that ned to refer to the last resulting block.
+ void UpdateSplitBlock(MachineBasicBlock *First, MachineBasicBlock *Last);
+
private:
// Terminator instructions.
void visitRet(const ReturnInst &I);