summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2016-08-26 22:32:55 +0000
committerQuentin Colombet <qcolombet@apple.com>2016-08-26 22:32:55 +0000
commite063e1f68a43354795a626b6546c50ade038437e (patch)
tree3a41fdab02c38699e2c9dec1c788b1464249f3d2 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent380cd3eb23ecc107d569e378ee5a69f26f4000ba (diff)
downloadbcm5719-llvm-e063e1f68a43354795a626b6546c50ade038437e.tar.gz
bcm5719-llvm-e063e1f68a43354795a626b6546c50ade038437e.zip
[SelectionDAG] Do not run the ISel process on already selected code.
Right now, this cannot happen, but with the fall back path of GlobalISel it will show up eventually. llvm-svn: 279877
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index e886d6770eb..b9c4eb3f43b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -426,6 +426,10 @@ static void SplitCriticalSideEffectEdges(Function &Fn) {
}
bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
+ // If we already selected that function, we do not need to run SDISel.
+ if (mf.getProperties().hasProperty(
+ MachineFunctionProperties::Property::Selected))
+ return false;
// Do some sanity-checking on the command-line options.
assert((!EnableFastISelVerbose || TM.Options.EnableFastISel) &&
"-fast-isel-verbose requires -fast-isel");
OpenPOWER on IntegriCloud