[llvm] r335883 - Revert "[MachineOutliner] Add always and never options to -enable-machine-outliner"

Jessica Paquette via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 28 10:26:20 PDT 2018


Author: paquette
Date: Thu Jun 28 10:26:19 2018
New Revision: 335883

URL: http://llvm.org/viewvc/llvm-project?rev=335883&view=rev
Log:
Revert "[MachineOutliner] Add always and never options to -enable-machine-outliner"

I accidentally committed this instead of D48683 because I haven't had coffee
yet.

Removed:
    llvm/trunk/test/CodeGen/AArch64/machine-outliner-flags.ll
Modified:
    llvm/trunk/lib/CodeGen/TargetPassConfig.cpp

Modified: llvm/trunk/lib/CodeGen/TargetPassConfig.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetPassConfig.cpp?rev=335883&r1=335882&r2=335883&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetPassConfig.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetPassConfig.cpp Thu Jun 28 10:26:19 2018
@@ -111,17 +111,9 @@ static cl::opt<bool> VerifyMachineCode("
     cl::desc("Verify generated machine code"),
     cl::init(false),
     cl::ZeroOrMore);
-enum RunOutliner { AlwaysOutline, NeverOutline };
-// Enable or disable the MachineOutliner.
-static cl::opt<RunOutliner> EnableMachineOutliner(
-    "enable-machine-outliner", cl::desc("Enable the machine outliner"),
-    cl::Hidden, cl::ValueOptional, cl::init(NeverOutline),
-    cl::values(clEnumValN(AlwaysOutline, "always",
-                          "Run on all functions guaranteed to be beneficial "
-                          "(pass -enable-linkonceodr-outlining for more)"),
-               clEnumValN(NeverOutline, "never", "Disable all outlining"),
-               // Sentinel value for unspecified option.
-               clEnumValN(AlwaysOutline, "", "")));
+static cl::opt<bool> EnableMachineOutliner("enable-machine-outliner",
+    cl::Hidden,
+    cl::desc("Enable machine outliner"));
 // Enable or disable FastISel. Both options are needed, because
 // FastISel is enabled by default with -fast, and we wish to be
 // able to enable or disable fast-isel independently from -O0.
@@ -914,7 +906,7 @@ void TargetPassConfig::addMachinePasses(
   addPass(&XRayInstrumentationID, false);
   addPass(&PatchableFunctionID, false);
 
-  if (EnableMachineOutliner == AlwaysOutline)
+  if (EnableMachineOutliner)
     addPass(createMachineOutlinerPass());
 
   // Add passes that directly emit MI after all other MI passes.

Removed: llvm/trunk/test/CodeGen/AArch64/machine-outliner-flags.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/machine-outliner-flags.ll?rev=335882&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/machine-outliner-flags.ll (original)
+++ llvm/trunk/test/CodeGen/AArch64/machine-outliner-flags.ll (removed)
@@ -1,30 +0,0 @@
-; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
-; RUN: -enable-machine-outliner=always -mtriple arm64---- -o /dev/null 2>&1 \
-; RUN: | FileCheck %s -check-prefix=ALWAYS
-
-; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
-; RUN: -enable-machine-outliner -mtriple arm64---- -o /dev/null 2>&1 \
-; RUN: | FileCheck %s -check-prefix=ENABLE
-
-; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
-; RUN: -enable-machine-outliner=never -mtriple arm64---- -o /dev/null 2>&1 \
-; RUN: | FileCheck %s -check-prefix=NEVER
-
-; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
-; RUN: -mtriple arm64---- -o /dev/null 2>&1 \
-; RUN: | FileCheck %s -check-prefix=NOT-ADDED
-
-; Make sure that the outliner flags all work properly. If we specify
-; -enable-machine-outliner with always or no argument, it should be added to the
-; pass pipeline. If we specify it with never, or don't pass the flag,
-; then we shouldn't add it.
-
-; ALWAYS: Machine Outliner
-; ENABLE: Machine Outliner
-; NEVER-NOT: Machine Outliner
-; NOT-ADDED-NOT: Machine Outliner
-
-define void @foo() {
-  ret void;
-}
-




More information about the llvm-commits mailing list