SelectBasicBlock is rather slow even when it doesn't do anything; skip the

unnecessary work where possible.

llvm-svn: 129763
This commit is contained in:
Eli Friedman
2011-04-19 17:01:08 +00:00
parent 0b68c1219f
commit bcd09b3a7f

View File

@@ -1017,11 +1017,13 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
else
++NumFastIselBlocks;
// Run SelectionDAG instruction selection on the remainder of the block
// not handled by FastISel. If FastISel is not run, this is the entire
// block.
bool HadTailCall;
SelectBasicBlock(Begin, BI, HadTailCall);
if (Begin != BI) {
// Run SelectionDAG instruction selection on the remainder of the block
// not handled by FastISel. If FastISel is not run, this is the entire
// block.
bool HadTailCall;
SelectBasicBlock(Begin, BI, HadTailCall);
}
FinishBasicBlock();
FuncInfo->PHINodesToUpdate.clear();