summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp9
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp3
2 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index 8f78240e1f7..8e92cd482d8 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -1331,15 +1331,6 @@ bool MachineOutliner::runOnModule(Module &M) {
const TargetRegisterInfo *TRI = STI.getRegisterInfo();
const TargetInstrInfo *TII = STI.getInstrInfo();
- // Does the target implement the MachineOutliner? If it doesn't, quit here.
- if (!TII->useMachineOutliner()) {
- // No. So we're done.
- LLVM_DEBUG(
- dbgs()
- << "Skipping pass: Target does not support the MachineOutliner.\n");
- return false;
- }
-
// If the user specifies that they want to outline from linkonceodrs, set
// it here.
OutlineFromLinkOnceODRs = EnableLinkOnceODROutlining;
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 8c5bdde888e..0ac89917012 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -906,7 +906,8 @@ void TargetPassConfig::addMachinePasses() {
addPass(&XRayInstrumentationID, false);
addPass(&PatchableFunctionID, false);
- if (EnableMachineOutliner)
+ if (TM->Options.EnableMachineOutliner &&
+ EnableMachineOutliner)
addPass(createMachineOutlinerPass());
// Add passes that directly emit MI after all other MI passes.
OpenPOWER on IntegriCloud