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 | 20d4be151b54feb18aa1e5cc04033a4aa64137ae (patch) | |
tree | 5df800c11b786098efd82b64d5f21b8c3d200f35 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | abd1d859b3c35957a3dd5965cf1fd420df0d20e3 (diff) | |
download | external_llvm-20d4be151b54feb18aa1e5cc04033a4aa64137ae.zip external_llvm-20d4be151b54feb18aa1e5cc04033a4aa64137ae.tar.gz external_llvm-20d4be151b54feb18aa1e5cc04033a4aa64137ae.tar.bz2 |
Enable on-demand fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 3b0ef18..0848e46 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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; |