[PATCH] D118682: [llvm-reduce] Make all llvm-reduce specifict options use the same options category

Markus Lavin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 1 00:47:49 PST 2022


markus created this revision.
markus added reviewers: aeubanks, fhahn.
markus requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Previously the options category given to `cl::HideUnrelatedOptions` was local to `llvm-reduce.cpp` and as a result only options declared in that file were visible in the `-help` options listing. This was a bit unfortunate since there were several useful options declared in other files. This patch addresses that. The full options listing is now:

  OVERVIEW: LLVM automatic testcase reducer.
  
  USAGE: llvm-reduce [options] <input llvm ll/bc file>
  
  OPTIONS:
  
  Color Options:
  
    --color                             - Use colors in output (default=autodetect)
  
  Generic Options:
  
    --help                              - Display available options (--help-hidden for more)
    --help-list                         - Display list of available options (--help-list-hidden for more)
    --version                           - Display the version of this program
  
  llvm-reduce options:
  
    --abort-on-invalid-reduction        - Abort if any reduction results in invalid IR
    --delta-passes=<string>             - Delta passes to run, separated by commas. By default, run all delta passes.
    --in-place                          - WARNING: This option will replace your input file with the reduced version!
    -j=<uint>                           - Maximum number of threads to use to process chunks. Set to 1 to disables parallelism.
    --max-pass-iterations=<int>         - Maximum number of times to run the full set of delta passes (default=1)
    --mtriple=<string>                  - Set the target triple
    --print-delta-passes                - Print list of delta passes, passable to --delta-passes as a comma separated list
    --starting-granularity-level=<uint> - Number of times to divide chunks prior to first test
    --test=<string>                     - Name of the interesting-ness test to be run
    --test-arg=<string>                 - Arguments passed onto the interesting-ness test
    --write-tmp-files-as-bitcode        - Write temporary files as bitcode, instead of textual IR
    -x=<value>                          - Input language ('ir' or 'mir')
      =ir
      =mir


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118682

Files:
  llvm/tools/llvm-reduce/DeltaManager.cpp
  llvm/tools/llvm-reduce/deltas/Delta.cpp
  llvm/tools/llvm-reduce/llvm-reduce.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118682.404834.patch
Type: text/x-patch
Size: 5890 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220201/9fb106df/attachment.bin>


More information about the llvm-commits mailing list