diff options
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 044dcf7..dfdf676 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -111,9 +111,16 @@ static cl::opt<bool> VerifyMachineCode("verify-machineinstrs", cl::Hidden, cl::desc("Verify generated machine code"), cl::init(false), cl::ZeroOrMore); -static cl::opt<bool> EnableMachineOutliner("enable-machine-outliner", - cl::Hidden, - cl::desc("Enable machine outliner")); +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"), + clEnumValN(NeverOutline, "never", "Disable all outlining"), + // Sentinel value for unspecified option. + clEnumValN(AlwaysOutline, "", ""))); // 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. @@ -907,7 +914,7 @@ void TargetPassConfig::addMachinePasses() { addPass(&PatchableFunctionID, false); if (TM->Options.EnableMachineOutliner && getOptLevel() != CodeGenOpt::None && - EnableMachineOutliner) + EnableMachineOutliner == AlwaysOutline) addPass(createMachineOutlinerPass()); // Add passes that directly emit MI after all other MI passes. |