diff options
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index d8d9f38..847a1ae 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -1017,7 +1017,7 @@ bool TargetPassConfig::addCoreISelPasses() { if (Selector != SelectorType::GlobalISel || !isGlobalISelAbortEnabled()) DebugifyIsSafe = false; - // Add instruction selector passes. + // Add instruction selector passes for global isel if enabled. if (Selector == SelectorType::GlobalISel) { SaveAndRestore SavedAddingMachinePasses(AddingMachinePasses, true); if (addIRTranslator()) @@ -1043,15 +1043,14 @@ bool TargetPassConfig::addCoreISelPasses() { // Pass to reset the MachineFunction if the ISel failed. addPass(createResetMachineFunctionPass( reportDiagnosticWhenGlobalISelFallback(), isGlobalISelAbortEnabled())); + } - // Provide a fallback path when we do not want to abort on - // not-yet-supported input. - if (!isGlobalISelAbortEnabled() && addInstSelector()) + // Run the SDAG InstSelector, providing a fallback path when we do not want to + // abort on not-yet-supported input. + if (Selector != SelectorType::GlobalISel || !isGlobalISelAbortEnabled()) + if (addInstSelector()) return true; - } else if (addInstSelector()) - return true; - // Expand pseudo-instructions emitted by ISel. Don't run the verifier before // FinalizeISel. addPass(&FinalizeISelID); |