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:
Dan Gohman
2010-04-23 15:29:50 +00:00
parent 27ef9976c2
commit e8c92dd439
3 changed files with 14 additions and 22 deletions

View File

@@ -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.

View File

@@ -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;