mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 19:07:53 +08:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user