summaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide/opt.rst
AgeCommit message (Collapse)Author
2025-11-13[opt] Add --save-stats option (#167304)Tomer Shafir
This patch adds a Clang-compatible --save-stats option to opt, to provide an easy to use way to save LLVM statistics files when working with opt on the middle end. This is a follow up on the addition to `llc`: https://github.com/llvm/llvm-project/pull/163967 Like on Clang, one can specify --save-stats, --save-stats=cwd, and --save-stats=obj with the same semantics and JSON format. The pre-existing --stats option is not affected. The implementation extracts the flag and its methods into the common `CodeGen/CommandFlags` as `LLVM_ABI`, using a new registration class to conservatively enable opt-in rather than let all tools take it. Its only needed for llc and opt for now. Then it refactors llc and adds support for opt.
2025-08-01[Docs] Update Opt's Option to Specify Pass Pipeline (NFC) (#148402)veera
Since the new pass manager, we use `--passes=<string>` to specify the pass pipeline instead of the `-{passname}` syntax.
2022-02-10[docs] Replace `opt -analyze` with better alternatives.Arthur Eubanks
`opt -analyze` is legacy PM-specific. Show better ways of doing the same thing, generally with some sort of `-passes=print<foo>`. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D119486
2021-09-24[docs] Document the --print-passes flag in opt.Frederic Cambus
Reviewed By: aeubanks, asbirlea Differential Revision: https://reviews.llvm.org/D109663
2021-09-13[opt] Remove some legacy PM flagsArthur Eubanks
Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D109664
2019-07-04[docs] [NFC] Removed excess spacingAlex Brachet
Summary: Removed excess new lines from documentations. As far as I can tell, it seems as though restructured text is agnostic to new lines, the use of new lines was inconsistent and had no effect on how the files were being displayed. Reviewers: jhenderson, rupprecht, JDevlieghere Reviewed By: jhenderson Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63971 llvm-svn: 365105
2019-06-27[docs][tools] Add missing "program" tags to rst filesJames Henderson
Sphinx allows for definitions of command-line options using `.. option <name>` and references to those options via `:option:<name>`. However, it looks like there is no scoping of these options by default, meaning that links can end up pointing to incorrect documents. See for example the llvm-mca document, which contains references to -o that, prior to this patch, pointed to a different document. What's worse is that these links appear to be non-deterministic in which one is picked (on my machine, some references end up pointing to opt, whereas on the live docs, they point to llvm-dwarfdump, for example). The fix is to add the .. program <name> tag. This essentially namespaces the options (definitions and references) to the named program, ensuring that the links are kept correct. Reviwed by: andreadb Differential Revision: https://reviews.llvm.org/D63873 llvm-svn: 364538
2018-05-14Rename DEBUG macro to LLVM_DEBUG.Nicola Zaghen
The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM - Manual change to APInt - Manually chage DOCS as regex doesn't match it. In the transition period the DEBUG() macro is still present and aliased to the LLVM_DEBUG() one. Differential Revision: https://reviews.llvm.org/D43624 llvm-svn: 332240
2016-07-20[docs] Fixing Sphinx warnings to unclog the buildbotRenato Golin
Lots of blocks had "llvm" or "nasm" syntax types but either weren't following the syntax, or the syntax has changed (and sphinx hasn't keep up) or the type doesn't even exist (nasm?). Other documents had :options: what were invalid. I only removed those that had warnings, and left the ones that didn't, in order to follow the principle of least surprise. This is like this for ages, but the buildbot is now failing on errors. It may take a while to upgrade the buildbot's sphinx, if that's even possible, but that shouldn't stop us from getting docs updates (which seem down for quite a while). Also, we're not losing any syntax highlight, since when it doesn't parse, it doesn't colour. Ie. those blocks are not being highlighted anyway. I'm trying to get all docs in one go, so that it's easy to revert later if we do fix, or at least easy to know what's to fix. llvm-svn: 276109
2014-10-16Delete -std-compile-opts.Rafael Espindola
These days -std-compile-opts was just a silly alias for -O3. llvm-svn: 219951
2014-06-04docs: Remove documentation for legacy PGO optionsJustin Bogner
Late last year r191835 removed a largely unmaintained legacy PGO infrastructure, but some of the docs were missed. Since these docs are for things that don't actually exist anymore, they should be removed. llvm-svn: 210165
2014-02-19[docs] Clean up some more llvm-gcc stuffSean Silva
Some references to llvm-gcc were so crusty that I wasn't sure how to proceed and so I've left them intact. I also slipped in a quick peephole fix to use a :doc: link instead of raw HTML link. llvm-svn: 201619
2012-11-29Documentation for opt: reformatDmitri Gribenko
llvm-svn: 168919
2012-06-12Use correct syntax highliter in code blocks. Noticed by Sean Silva.Dmitri Gribenko
llvm-svn: 158359
2012-05-08[docs] Add ReST version of all the man pages.Daniel Dunbar
- The POD versions are slated for execution, but are still around until llvm.org machinery is in place. llvm-svn: 156384