llvm.org GIT mirror llvm / 9a4e15c
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319505 91177308-0d34-0410-b5e6-96231b3b80d8 Zachary Turner 3 years ago
24 changed file(s) with 85 addition(s) and 85 deletion(s). Raw diff Collapse all Expand all
4646 #endif
4747 static cl::opt
4848 VerifyLoopInfoX("verify-loop-info", cl::location(VerifyLoopInfo),
49 cl::desc("Verify loop info (time consuming)"));
49 cl::Hidden, cl::desc("Verify loop info (time consuming)"));
5050
5151 //===----------------------------------------------------------------------===//
5252 // Loop implementation
2020
2121 /// \brief A handy option to enable/disable all ARC Optimizations.
2222 bool llvm::objcarc::EnableARCOpts;
23 static cl::opt
24 EnableARCOptimizations("enable-objc-arc-opts",
25 cl::desc("enable/disable all ARC Optimizations"),
26 cl::location(EnableARCOpts),
27 cl::init(true));
23 static cl::opt EnableARCOptimizations(
24 "enable-objc-arc-opts", cl::desc("enable/disable all ARC Optimizations"),
25 cl::location(EnableARCOpts), cl::init(true), cl::Hidden);
152152 cl::init(100));
153153
154154 // FIXME: Enable this with EXPENSIVE_CHECKS when the test suite is clean.
155 static cl::opt VerifySCEV(
156 "verify-scev", cl::Hidden,
157 cl::desc("Verify ScalarEvolution's backedge taken counts (slow)"));
155158 static cl::opt
156 VerifySCEV("verify-scev",
157 cl::desc("Verify ScalarEvolution's backedge taken counts (slow)"));
158 static cl::opt
159 VerifySCEVMap("verify-scev-maps",
159 VerifySCEVMap("verify-scev-maps", cl::Hidden,
160160 cl::desc("Verify no dangling value in ScalarEvolution's "
161161 "ExprValueMap (slow)"));
162162
4747 // can also be achieved by stripping the associated metadata tags from IR, but
4848 // this option is sometimes more convenient.
4949 static cl::opt EnableScopedNoAlias("enable-scoped-noalias",
50 cl::init(true));
50 cl::init(true), cl::Hidden);
5151
5252 namespace {
5353
141141 // A handy option for disabling TBAA functionality. The same effect can also be
142142 // achieved by stripping the !tbaa tags from IR, but this option is sometimes
143143 // more convenient.
144 static cl::opt EnableTBAA("enable-tbaa", cl::init(true));
144 static cl::opt EnableTBAA("enable-tbaa", cl::init(true), cl::Hidden);
145145
146146 namespace {
147147
6262
6363 static cl::opt PageSize("imp-null-check-page-size",
6464 cl::desc("The page size of the target in bytes"),
65 cl::init(4096));
65 cl::init(4096), cl::Hidden);
6666
6767 static cl::opt MaxInstsToConsider(
6868 "imp-null-max-insts-to-consider",
6969 cl::desc("The max number of instructions to consider hoisting loads over "
7070 "(the algorithm is quadratic over this number)"),
71 cl::init(8));
71 cl::Hidden, cl::init(8));
7272
7373 #define DEBUG_TYPE "implicit-null-checks"
7474
7474
7575 using namespace llvm;
7676
77 static cl::opt SimplifyMIR("simplify-mir",
77 static cl::opt SimplifyMIR(
78 "simplify-mir", cl::Hidden,
7879 cl::desc("Leave out unnecessary information when printing MIR"));
7980
8081 namespace {
2525 static bool VerifyMachineDomInfo = false;
2626 #endif
2727 static cl::opt VerifyMachineDomInfoX(
28 "verify-machine-dom-info", cl::location(VerifyMachineDomInfo),
28 "verify-machine-dom-info", cl::location(VerifyMachineDomInfo), cl::Hidden,
2929 cl::desc("Verify machine dominator info (time consuming)"));
3030
3131 namespace llvm {
3939 // Temporary verification option until we can put verification inside
4040 // MachineVerifier.
4141 static cl::opt
42 VerifyRegAlloc("verify-regalloc", cl::location(RegAllocBase::VerifyEnabled),
43 cl::desc("Verify during register allocation"));
42 VerifyRegAlloc("verify-regalloc", cl::location(RegAllocBase::VerifyEnabled),
43 cl::Hidden, cl::desc("Verify during register allocation"));
4444
4545 const char RegAllocBase::TimerGroupName[] = "regalloc";
4646 const char RegAllocBase::TimerGroupDescription[] = "Register Allocation";
104104 " interference at a time"),
105105 cl::init(8));
106106
107 static cl::opt
108 ExhaustiveSearch("exhaustive-register-search", cl::NotHidden,
109 cl::desc("Exhaustive Search for registers bypassing the depth "
110 "and interference cutoffs of last chance recoloring"));
107 static cl::opt ExhaustiveSearch(
108 "exhaustive-register-search", cl::NotHidden,
109 cl::desc("Exhaustive Search for registers bypassing the depth "
110 "and interference cutoffs of last chance recoloring"),
111 cl::Hidden);
111112
112113 static cl::opt EnableLocalReassignment(
113114 "enable-local-reassign", cl::Hidden,
6969 STATISTIC(NumLaneConflicts, "Number of dead lane conflicts tested");
7070 STATISTIC(NumLaneResolves, "Number of dead lane conflicts resolved");
7171
72 static cl::opt
73 EnableJoining("join-liveintervals",
74 cl::desc("Coalesce copies (default=true)"),
75 cl::init(true));
72 static cl::opt EnableJoining("join-liveintervals",
73 cl::desc("Coalesce copies (default=true)"),
74 cl::init(true), cl::Hidden);
7675
7776 static cl::opt UseTerminalRule("terminal-rule",
7877 cl::desc("Apply the terminal rule"),
127127 static unsigned LimitFloatPrecision;
128128
129129 static cl::opt
130 LimitFPPrecision("limit-float-precision",
131 cl::desc("Generate low-precision inline sequences "
132 "for some float libcalls"),
133 cl::location(LimitFloatPrecision),
134 cl::init(0));
130 LimitFPPrecision("limit-float-precision",
131 cl::desc("Generate low-precision inline sequences "
132 "for some float libcalls"),
133 cl::location(LimitFloatPrecision), cl::Hidden,
134 cl::init(0));
135135
136136 static cl::opt SwitchPeelThreshold(
137137 "switch-peel-threshold", cl::Hidden, cl::init(66),
4040 #define DEBUG_TYPE "stackmaps"
4141
4242 static cl::opt StackMapVersion(
43 "stackmap-version", cl::init(3),
43 "stackmap-version", cl::init(3), cl::Hidden,
4444 cl::desc("Specify the stackmap encoding version (default = 3)"));
4545
4646 const char *StackMaps::WSMP = "Stack Maps: ";
9292 static cl::opt EnableImplicitNullChecks(
9393 "enable-implicit-null-checks",
9494 cl::desc("Fold null checks into faulting memory operations"),
95 cl::init(false));
96 static cl::opt EnableMergeICmps(
97 "enable-mergeicmps",
98 cl::desc("Merge ICmp chains into a single memcmp"),
99 cl::init(false));
95 cl::init(false), cl::Hidden);
96 static cl::opt
97 EnableMergeICmps("enable-mergeicmps",
98 cl::desc("Merge ICmp chains into a single memcmp"),
99 cl::init(false), cl::Hidden);
100100 static cl::opt PrintLSR("print-lsr-output", cl::Hidden,
101101 cl::desc("Print LLVM IR produced by the loop-reduce pass"));
102102 static cl::opt PrintISelInput("print-isel-input", cl::Hidden,
126126 EnableGlobalISel("global-isel", cl::Hidden,
127127 cl::desc("Enable the \"global\" instruction selector"));
128128
129 static cl::opt
130 PrintMachineInstrs("print-machineinstrs", cl::ValueOptional,
131 cl::desc("Print machine instrs"),
132 cl::value_desc("pass-name"), cl::init("option-unspecified"));
129 static cl::opt PrintMachineInstrs(
130 "print-machineinstrs", cl::ValueOptional, cl::desc("Print machine instrs"),
131 cl::value_desc("pass-name"), cl::init("option-unspecified"), cl::Hidden);
133132
134133 static cl::opt EnableGlobalISelAbort(
135134 "global-isel-abort", cl::Hidden,
175174 static cl::opt
176175 StartAfterOpt(StringRef(StartAfterOptName),
177176 cl::desc("Resume compilation after a specific pass"),
178 cl::value_desc("pass-name"), cl::init(""));
177 cl::value_desc("pass-name"), cl::init(""), cl::Hidden);
179178
180179 static cl::opt
181180 StartBeforeOpt(StringRef(StartBeforeOptName),
182181 cl::desc("Resume compilation before a specific pass"),
183 cl::value_desc("pass-name"), cl::init(""));
182 cl::value_desc("pass-name"), cl::init(""), cl::Hidden);
184183
185184 static cl::opt
186185 StopAfterOpt(StringRef(StopAfterOptName),
187186 cl::desc("Stop compilation after a specific pass"),
188 cl::value_desc("pass-name"), cl::init(""));
187 cl::value_desc("pass-name"), cl::init(""), cl::Hidden);
189188
190189 static cl::opt
191190 StopBeforeOpt(StringRef(StopBeforeOptName),
192191 cl::desc("Stop compilation before a specific pass"),
193 cl::value_desc("pass-name"), cl::init(""));
192 cl::value_desc("pass-name"), cl::init(""), cl::Hidden);
194193
195194 /// Allow standard passes to be disabled by command line options. This supports
196195 /// simple binary flags that either suppress the pass or do nothing.
766765 /// -regalloc=... command line option.
767766 static FunctionPass *useDefaultRegisterAllocator() { return nullptr; }
768767 static cl::opt
769 RegisterPassParser >
770 RegAlloc("regalloc",
771 cl::init(&useDefaultRegisterAllocator),
772 cl::desc("Register allocator to use"));
768 RegisterPassParser>
769 RegAlloc("regalloc", cl::Hidden, cl::init(&useDefaultRegisterAllocator),
770 cl::desc("Register allocator to use"));
773771
774772 /// Add the complete set of target-independent postISel code generator passes.
775773 ///
2626
2727 cl::opt
2828 UseDbgAddr("use-dbg-addr",
29 llvm::cl::desc("Use llvm.dbg.addr for all local variables"),
30 cl::init(false));
29 llvm::cl::desc("Use llvm.dbg.addr for all local variables"),
30 cl::init(false), cl::Hidden);
3131
3232 DIBuilder::DIBuilder(Module &m, bool AllowUnresolvedNodes)
3333 : M(m), VMContext(M.getContext()), CUNode(nullptr),
3232 #else
3333 bool llvm::VerifyDomInfo = false;
3434 #endif
35 static cl::opt
36 VerifyDomInfoX("verify-dom-info", cl::location(VerifyDomInfo),
37 cl::desc("Verify dominator info (time consuming)"));
35 static cl::opt
36 VerifyDomInfoX("verify-dom-info", cl::location(VerifyDomInfo), cl::Hidden,
37 cl::desc("Verify dominator info (time consuming)"));
3838
3939 bool BasicBlockEdge::isSingleEdge() const {
4040 const TerminatorInst *TI = Start->getTerminator();
7474 llvm::cl::desc("Print IR after specified passes"),
7575 cl::Hidden);
7676
77 static cl::opt
78 PrintBeforeAll("print-before-all",
79 llvm::cl::desc("Print IR before each pass"),
80 cl::init(false));
81 static cl::opt
82 PrintAfterAll("print-after-all",
83 llvm::cl::desc("Print IR after each pass"),
84 cl::init(false));
77 static cl::opt PrintBeforeAll("print-before-all",
78 llvm::cl::desc("Print IR before each pass"),
79 cl::init(false), cl::Hidden);
80 static cl::opt PrintAfterAll("print-after-all",
81 llvm::cl::desc("Print IR after each pass"),
82 cl::init(false), cl::Hidden);
8583
8684 static cl::list
8785 PrintFuncsList("filter-print-funcs", cl::value_desc("function names"),
8886 cl::desc("Only print IR for functions whose name "
8987 "match this for all print-[before|after][-all] "
9088 "options"),
91 cl::CommaSeparated);
89 cl::CommaSeparated, cl::Hidden);
9290
9391 /// This is a helper to determine whether to print IR before or
9492 /// after a pass.
17281726 // TimingInfo implementation
17291727
17301728 bool llvm::TimePassesIsEnabled = false;
1731 static cl::opt
1732 EnableTiming("time-passes", cl::location(TimePassesIsEnabled),
1733 cl::desc("Time each pass, printing elapsed time for each on exit"));
1729 static cl::opt EnableTiming(
1730 "time-passes", cl::location(TimePassesIsEnabled), cl::Hidden,
1731 cl::desc("Time each pass, printing elapsed time for each on exit"));
17341732
17351733 // createTheTimeInfo - This method either initializes the TheTimeInfo pointer to
17361734 // a non-null value (if the -time-passes option is enabled) or it leaves it
5555 using namespace llvm;
5656
5757 static cl::opt StaticFuncFullModulePrefix(
58 "static-func-full-module-prefix", cl::init(true),
58 "static-func-full-module-prefix", cl::init(true), cl::Hidden,
5959 cl::desc("Use full module build paths in the profile counter names for "
6060 "static functions."));
6161
6868 // the source directory name not being stripped. A non-zero option value here
6969 // can potentially prevent some inter-module indirect-call-promotions.
7070 static cl::opt StaticFuncStripDirNamePrefix(
71 "static-func-strip-dirname-prefix", cl::init(0),
71 "static-func-strip-dirname-prefix", cl::init(0), cl::Hidden,
7272 cl::desc("Strip specified level of directory name from source path in "
7373 "the profile counter name for static functions."));
7474
3131 //
3232 // Do not change to cl::opt since this silently breaks argument parsing.
3333 static cl::opt
34 Seed("rng-seed", cl::value_desc("seed"),
35 cl::desc("Seed for the random number generator"), cl::init(0));
34 Seed("rng-seed", cl::value_desc("seed"), cl::Hidden,
35 cl::desc("Seed for the random number generator"), cl::init(0));
3636
3737 RandomNumberGenerator::RandomNumberGenerator(StringRef Salt) {
3838 DEBUG(
3838 /// -stats - Command line option to cause transformations to emit stats about
3939 /// what they did.
4040 ///
41 static cl::opt Stats("stats",
42 cl::desc("Enable statistics output from program (available with Asserts)"));
43
41 static cl::opt Stats(
42 "stats",
43 cl::desc("Enable statistics output from program (available with Asserts)"),
44 cl::Hidden);
4445
4546 static cl::opt StatsAsJSON("stats-json",
46 cl::desc("Display statistics as json data"));
47 cl::desc("Display statistics as json data"),
48 cl::Hidden);
4749
4850 static bool Enabled;
4951 static bool PrintOnExit;
2626 ATT = 0, Intel = 1
2727 };
2828
29 static cl::opt
30 AsmWriterFlavor("x86-asm-syntax", cl::init(ATT),
31 cl::desc("Choose style of code to emit from X86 backend:"),
32 cl::values(clEnumValN(ATT, "att", "Emit AT&T-style assembly"),
33 clEnumValN(Intel, "intel", "Emit Intel-style assembly")));
29 static cl::opt AsmWriterFlavor(
30 "x86-asm-syntax", cl::init(ATT), cl::Hidden,
31 cl::desc("Choose style of code to emit from X86 backend:"),
32 cl::values(clEnumValN(ATT, "att", "Emit AT&T-style assembly"),
33 clEnumValN(Intel, "intel", "Emit Intel-style assembly")));
3434
3535 static cl::opt
3636 MarkedJTDataRegions("mark-data-regions", cl::init(true),
4646 #include "X86GenInstrInfo.inc"
4747
4848 static cl::opt
49 NoFusing("disable-spill-fusing",
50 cl::desc("Disable fusing of spill code into instructions"));
49 NoFusing("disable-spill-fusing",
50 cl::desc("Disable fusing of spill code into instructions"),
51 cl::Hidden);
5152 static cl::opt
5253 PrintFailedFusing("print-failed-fuse-candidates",
5354 cl::desc("Print instructions that the allocator wants to"
5555 #else
5656 static bool VerifyLoopLCSSA = false;
5757 #endif
58 static cl::opt
59 VerifyLoopLCSSAFlag("verify-loop-lcssa", cl::location(VerifyLoopLCSSA),
60 cl::desc("Verify loop lcssa form (time consuming)"));
58 static cl::opt
59 VerifyLoopLCSSAFlag("verify-loop-lcssa", cl::location(VerifyLoopLCSSA),
60 cl::Hidden,
61 cl::desc("Verify loop lcssa form (time consuming)"));
6162
6263 /// Return true if the specified block is in the list.
6364 static bool isExitBlock(BasicBlock *BB,
8989
9090 static cl::list RewriteMapFiles("rewrite-map-file",
9191 cl::desc("Symbol Rewrite Map"),
92 cl::value_desc("filename"));
92 cl::value_desc("filename"),
93 cl::Hidden);
9394
9495 static void rewriteComdat(Module &M, GlobalObject *GO,
9596 const std::string &Source,