[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279877 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Quentin Colombet 2016-08-26 22:32:55 +00:00
parent ac0c6d3071
commit aaa2879009

View File

@ -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");