diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-04-19 17:01:08 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-04-19 17:01:08 +0000 |
commit | 37d38bfbbf2b8db2c75b2edbd8cd30c51746fd5d (patch) | |
tree | 0ce1be70e9854857e62a85d3b375f8957c6265c4 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | fc52163a45b9ea147db1c20a1db3edff0f0bf652 (diff) |
SelectBasicBlock is rather slow even when it doesn't do anything; skip the
unnecessary work where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 8e599aef7f..af3188895e 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -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(); |