diff options
| author | Zachary Turner <zturner@google.com> | 2017-12-01 00:53:10 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-12-01 00:53:10 +0000 |
| commit | 8065f0b975022c1419ab6c1ee6dca64b209311dc (patch) | |
| tree | 014b235430c601a19300b725575ac65e37d44e3e /llvm/lib/CodeGen/TargetPassConfig.cpp | |
| parent | 888a42829238a00fd7e5d6daf07d48324699f5f2 (diff) | |
| download | bcm5719-llvm-8065f0b975022c1419ab6c1ee6dca64b209311dc.tar.gz bcm5719-llvm-8065f0b975022c1419ab6c1ee6dca64b209311dc.zip | |
Mark all library options as hidden.
These command line options are not intended for public use, and often
don't even make sense in the context of a particular tool anyway. About
90% of them are already hidden, but when people add new options they
forget to hide them, so if you were to make a brand new tool today, link
against one of LLVM's libraries, and run tool -help you would get a
bunch of junk that doesn't make sense for the tool you're writing.
This patch hides these options. The real solution is to not have
libraries defining command line options, but that's a much larger effort
and not something I'm prepared to take on.
Differential Revision: https://reviews.llvm.org/D40674
llvm-svn: 319505
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 3f2a31a69cf..121bed5a79c 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -93,11 +93,11 @@ static cl::opt<bool> DisablePartialLibcallInlining("disable-partial-libcall-inli static cl::opt<bool> EnableImplicitNullChecks( "enable-implicit-null-checks", cl::desc("Fold null checks into faulting memory operations"), - cl::init(false)); -static cl::opt<bool> EnableMergeICmps( - "enable-mergeicmps", - cl::desc("Merge ICmp chains into a single memcmp"), - cl::init(false)); + cl::init(false), cl::Hidden); +static cl::opt<bool> + EnableMergeICmps("enable-mergeicmps", + cl::desc("Merge ICmp chains into a single memcmp"), + cl::init(false), cl::Hidden); static cl::opt<bool> PrintLSR("print-lsr-output", cl::Hidden, cl::desc("Print LLVM IR produced by the loop-reduce pass")); static cl::opt<bool> PrintISelInput("print-isel-input", cl::Hidden, @@ -127,10 +127,9 @@ static cl::opt<cl::boolOrDefault> EnableGlobalISel("global-isel", cl::Hidden, cl::desc("Enable the \"global\" instruction selector")); -static cl::opt<std::string> -PrintMachineInstrs("print-machineinstrs", cl::ValueOptional, - cl::desc("Print machine instrs"), - cl::value_desc("pass-name"), cl::init("option-unspecified")); +static cl::opt<std::string> PrintMachineInstrs( + "print-machineinstrs", cl::ValueOptional, cl::desc("Print machine instrs"), + cl::value_desc("pass-name"), cl::init("option-unspecified"), cl::Hidden); static cl::opt<int> EnableGlobalISelAbort( "global-isel-abort", cl::Hidden, @@ -176,22 +175,22 @@ const char *StopBeforeOptName = "stop-before"; static cl::opt<std::string> StartAfterOpt(StringRef(StartAfterOptName), cl::desc("Resume compilation after a specific pass"), - cl::value_desc("pass-name"), cl::init("")); + cl::value_desc("pass-name"), cl::init(""), cl::Hidden); static cl::opt<std::string> StartBeforeOpt(StringRef(StartBeforeOptName), cl::desc("Resume compilation before a specific pass"), - cl::value_desc("pass-name"), cl::init("")); + cl::value_desc("pass-name"), cl::init(""), cl::Hidden); static cl::opt<std::string> StopAfterOpt(StringRef(StopAfterOptName), cl::desc("Stop compilation after a specific pass"), - cl::value_desc("pass-name"), cl::init("")); + cl::value_desc("pass-name"), cl::init(""), cl::Hidden); static cl::opt<std::string> StopBeforeOpt(StringRef(StopBeforeOptName), cl::desc("Stop compilation before a specific pass"), - cl::value_desc("pass-name"), cl::init("")); + cl::value_desc("pass-name"), cl::init(""), cl::Hidden); /// Allow standard passes to be disabled by command line options. This supports /// simple binary flags that either suppress the pass or do nothing. @@ -767,10 +766,9 @@ bool TargetPassConfig::addISelPasses() { /// -regalloc=... command line option. static FunctionPass *useDefaultRegisterAllocator() { return nullptr; } static cl::opt<RegisterRegAlloc::FunctionPassCtor, false, - RegisterPassParser<RegisterRegAlloc> > -RegAlloc("regalloc", - cl::init(&useDefaultRegisterAllocator), - cl::desc("Register allocator to use")); + RegisterPassParser<RegisterRegAlloc>> + RegAlloc("regalloc", cl::Hidden, cl::init(&useDefaultRegisterAllocator), + cl::desc("Register allocator to use")); /// Add the complete set of target-independent postISel code generator passes. /// |

