mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
Move FastISel's HandlePHINodesInSuccessorBlocks call down into FastISel
itself too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -553,6 +553,12 @@ bool FastISel::SelectBitCast(const User *I) {
|
||||
|
||||
bool
|
||||
FastISel::SelectInstruction(const Instruction *I) {
|
||||
// Just before the terminator instruction, insert instructions to
|
||||
// feed PHI nodes in successor blocks.
|
||||
if (isa<TerminatorInst>(I))
|
||||
if (!HandlePHINodesInSuccessorBlocks(I->getParent()))
|
||||
return false;
|
||||
|
||||
DL = I->getDebugLoc();
|
||||
|
||||
// First, try doing target-independent selection.
|
||||
|
@@ -751,20 +751,6 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
|
||||
FastIS->startNewBlock(BB);
|
||||
// Do FastISel on as many instructions as possible.
|
||||
for (; BI != End; ++BI) {
|
||||
// Just before the terminator instruction, insert instructions to
|
||||
// feed PHI nodes in successor blocks.
|
||||
if (isa<TerminatorInst>(BI))
|
||||
if (!FastIS->HandlePHINodesInSuccessorBlocks(LLVMBB)) {
|
||||
++NumFastIselFailures;
|
||||
if (EnableFastISelVerbose || EnableFastISelAbort) {
|
||||
dbgs() << "FastISel miss: ";
|
||||
BI->dump();
|
||||
}
|
||||
assert(!EnableFastISelAbort &&
|
||||
"FastISel didn't handle a PHI in a successor");
|
||||
break;
|
||||
}
|
||||
|
||||
// Try to select the instruction with FastISel.
|
||||
if (FastIS->SelectInstruction(BI))
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user