mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Ensure that HandlePHINodesInSuccessorBlocks is run for all blocks,
even in FastISel mode in the case where FastISel successfully selects all the instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
21dbb99964
commit
d2ff647964
@ -5536,7 +5536,7 @@ void SelectionDAGISel::SelectBasicBlock(BasicBlock *LLVMBB,
|
||||
}
|
||||
|
||||
// Handle PHI nodes in successor blocks.
|
||||
if (Begin != End && End == LLVMBB->end())
|
||||
if (End == LLVMBB->end())
|
||||
HandlePHINodesInSuccessorBlocks(LLVMBB);
|
||||
|
||||
// Make sure the root of the DAG is up-to-date.
|
||||
@ -5798,7 +5798,13 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF) {
|
||||
}
|
||||
}
|
||||
|
||||
if (Begin != End)
|
||||
// Run SelectionDAG instruction selection on the remainder of the block
|
||||
// not handled by FastISel. If FastISel is not run, this is the entire
|
||||
// block. If FastISel is run and happens to handle all of the
|
||||
// LLVM Instructions in the block, [Begin,End) will be an empty range,
|
||||
// but we still need to run this so that
|
||||
// HandlePHINodesInSuccessorBlocks is called and any resulting code
|
||||
// is emitted.
|
||||
SelectBasicBlock(LLVMBB, Begin, End);
|
||||
|
||||
FinishBasicBlock();
|
||||
|
Loading…
Reference in New Issue
Block a user