[llvm-commits] [llvm] r129763 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Eli Friedman
eli.friedman at gmail.com
Tue Apr 19 10:01:08 PDT 2011
Author: efriedma
Date: Tue Apr 19 12:01:08 2011
New Revision: 129763
URL: http://llvm.org/viewvc/llvm-project?rev=129763&view=rev
Log:
SelectBasicBlock is rather slow even when it doesn't do anything; skip the
unnecessary work where possible.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=129763&r1=129762&r2=129763&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Apr 19 12:01:08 2011
@@ -1017,11 +1017,13 @@
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();
More information about the llvm-commits
mailing list