diff options
| author | Dan Gohman <gohman@apple.com> | 2010-07-01 02:58:57 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-07-01 02:58:57 +0000 |
| commit | 722f5fc5672e6fdde1731e9d0cee3fd6bee1f490 (patch) | |
| tree | 98885e3eb6ae9e5f1a8794ca0284e6b2952d2a29 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
| parent | 207624edb00cf2c29678b75c49f2d052556ec7ac (diff) | |
| download | bcm5719-llvm-722f5fc5672e6fdde1731e9d0cee3fd6bee1f490.tar.gz bcm5719-llvm-722f5fc5672e6fdde1731e9d0cee3fd6bee1f490.zip | |
Enable on-demand fast-isel.
llvm-svn: 107377
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 3b0ef18dd85..0848e46c0ef 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -709,6 +709,12 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) { FastIS->startNewBlock(BB); // Do FastISel on as many instructions as possible. for (; BI != End; ++BI) { + // Defer instructions with no side effects; they'll be emitted + // on-demand later. + if (BI->isSafeToSpeculativelyExecute() && + !FuncInfo->ValueMap.count(BI)) + continue; + // Try to select the instruction with FastISel. if (FastIS->SelectInstruction(BI)) continue; |

