[PATCH] D73267: Fix helptext for opt/llc after 14fc20ca6
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 05:26:34 PST 2020
nemanjai created this revision.
nemanjai added reviewers: reames, skan, annita.zhang, fedor.sergeev.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
The commit https://reviews.llvm.org/rG14fc20ca6 added some options to the X86 back end that cause the help text for opt/llc to become much harder to read. The issue is that the `cl::value_desc` is part of the option name and is used to compute the indentation of the description text (i.e. the maximum length option name is what everything aligns to). Since the commit puts a large number of characters into that text, everything is aligned to that width.
This patch just reformats the option so that the description is contained in the description and the list of possible values is within the angle brackets:
--x86-align-branch=<jcc, fused, jmp, call, ret, indirect> - Specify types of branches to align (plus separated list of types):
jcc indicates conditional jumps
fused indicates fusedconditional jumps
jmp indicates unconditional jumps
call indicates direct and indirect calls
ret indicates rets
indirect indicates indirect jumps
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73267
Files:
llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
Index: llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
===================================================================
--- llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
+++ llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
@@ -86,12 +86,14 @@
cl::opt<X86AlignBranchKind, true, cl::parser<std::string>> X86AlignBranch(
"x86-align-branch",
cl::desc("Specify types of branches to align (plus separated list of "
- "types). The branches's types are combination of jcc, fused, "
- "jmp, call, ret, indirect."),
- cl::value_desc("jcc indicates conditional jumps, fused indicates fused "
- "conditional jumps, jmp indicates unconditional jumps, call "
- "indicates direct and indirect calls, ret indicates rets, "
- "indirect indicates indirect jumps."),
+ "types):"
+ "\njcc indicates conditional jumps"
+ "\nfused indicates fusedconditional jumps"
+ "\njmp indicates unconditional jumps"
+ "\ncall indicates direct and indirect calls"
+ "\nret indicates rets"
+ "\nindirect indicates indirect jumps"),
+ cl::value_desc("jcc, fused, jmp, call, ret, indirect"),
cl::location(X86AlignBranchKindLoc));
cl::opt<bool> X86AlignBranchWithin32BBoundaries(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73267.239862.patch
Type: text/x-patch
Size: 1342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200123/c4c831be/attachment.bin>
More information about the llvm-commits
mailing list