diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-07-13 23:39:46 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-07-13 23:39:46 +0000 |
commit | cfed2564f74c2a6b6340030cd12d5c0708acd25c (patch) | |
tree | eca81edfd2a541d154f08eb5600dd7ff6b90d764 /llvm/lib/CodeGen/TargetPassConfig.cpp | |
parent | 4beea6623250516c2f8fe72a1d1f91970510f31c (diff) | |
download | llvm-cfed2564f74c2a6b6340030cd12d5c0708acd25c.zip llvm-cfed2564f74c2a6b6340030cd12d5c0708acd25c.tar.gz llvm-cfed2564f74c2a6b6340030cd12d5c0708acd25c.tar.bz2 |
Add EnableIPRA to TargetOptions, and move the cl::opt -enable-ipra to TargetMachine.cpp
Avoid exposing a cl::opt in a public header and instead promote this
option in the API.
Alternatively, we could land the cl::opt in CommandFlags.h so that
it is available to every tool, but we would still have to find an
option for clang.
llvm-svn: 275348
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index dccdc52..fcb375e 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -124,10 +124,6 @@ static cl::opt<CFLAAType> UseCFLAA( "Enable both variants of CFL-AA"), clEnumValEnd)); -cl::opt<bool> UseIPRA("enable-ipra", cl::init(false), cl::Hidden, - cl::desc("Enable interprocedural register allocation " - "to reduce load/store at procedure calls.")); - /// Allow standard passes to be disabled by command line options. This supports /// simple binary flags that either suppress the pass or do nothing. /// i.e. -disable-mypass=false has no effect. @@ -522,7 +518,7 @@ void TargetPassConfig::addISelPrepare() { addPreISel(); // Force codegen to run according to the callgraph. - if (UseIPRA) + if (TM->Options.EnableIPRA) addPass(new DummyCGSCCPass); // Add both the safe stack and the stack protection passes: each of them will @@ -561,7 +557,7 @@ void TargetPassConfig::addISelPrepare() { void TargetPassConfig::addMachinePasses() { AddingMachinePasses = true; - if (UseIPRA) + if (TM->Options.EnableIPRA) addPass(createRegUsageInfoPropPass()); // Insert a machine instr printer pass after the specified pass. @@ -649,7 +645,7 @@ void TargetPassConfig::addMachinePasses() { addPreEmitPass(); - if (UseIPRA) + if (TM->Options.EnableIPRA) // Collect register usage information and produce a register mask of // clobbered registers, to be used to optimize call sites. addPass(createRegUsageInfoCollector()); |