<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/docs/CommandGuide/opt.rst, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[opt] Add --save-stats option (#167304)</title>
<updated>2025-11-13T14:03:28+00:00</updated>
<author>
<name>Tomer Shafir</name>
<email>tomer.shafir8@gmail.com</email>
</author>
<published>2025-11-13T14:03:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=35ffe103498029542222cf4edb31faea8e1ffb1c'/>
<id>35ffe103498029542222cf4edb31faea8e1ffb1c</id>
<content type='text'>
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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
<entry>
<title>[Docs] Update Opt's Option to Specify Pass Pipeline (NFC) (#148402)</title>
<updated>2025-08-01T13:18:01+00:00</updated>
<author>
<name>veera</name>
<email>veera@efficient.computer</email>
</author>
<published>2025-08-01T13:18:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6da1a0908a975a55adb5eae293b37ae0a850b21d'/>
<id>6da1a0908a975a55adb5eae293b37ae0a850b21d</id>
<content type='text'>
Since the new pass manager, we use `--passes=&lt;string&gt;` to specify the
pass pipeline instead of the `-{passname}` syntax.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the new pass manager, we use `--passes=&lt;string&gt;` to specify the
pass pipeline instead of the `-{passname}` syntax.</pre>
</div>
</content>
</entry>
<entry>
<title>[docs] Replace `opt -analyze` with better alternatives.</title>
<updated>2022-02-10T23:38:31+00:00</updated>
<author>
<name>Arthur Eubanks</name>
<email>aeubanks@google.com</email>
</author>
<published>2022-02-10T22:24:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2fa87ab52476fcf5554c0e57a555dcc10b8730e1'/>
<id>2fa87ab52476fcf5554c0e57a555dcc10b8730e1</id>
<content type='text'>
`opt -analyze` is legacy PM-specific. Show better ways of doing the same
thing, generally with some sort of `-passes=print&lt;foo&gt;`.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D119486
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`opt -analyze` is legacy PM-specific. Show better ways of doing the same
thing, generally with some sort of `-passes=print&lt;foo&gt;`.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D119486
</pre>
</div>
</content>
</entry>
<entry>
<title>[docs] Document the --print-passes flag in opt.</title>
<updated>2021-09-24T03:27:15+00:00</updated>
<author>
<name>Frederic Cambus</name>
<email>fred@statdns.com</email>
</author>
<published>2021-09-24T03:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4ed05312a1557b2f2552298a3aac12c2e224d77e'/>
<id>4ed05312a1557b2f2552298a3aac12c2e224d77e</id>
<content type='text'>
Reviewed By: aeubanks, asbirlea

Differential Revision: https://reviews.llvm.org/D109663
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed By: aeubanks, asbirlea

Differential Revision: https://reviews.llvm.org/D109663
</pre>
</div>
</content>
</entry>
<entry>
<title>[opt] Remove some legacy PM flags</title>
<updated>2021-09-13T22:50:03+00:00</updated>
<author>
<name>Arthur Eubanks</name>
<email>aeubanks@google.com</email>
</author>
<published>2021-09-12T21:39:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=096d9814aa07d8bf1939f75c3c632fcff2c3f573'/>
<id>096d9814aa07d8bf1939f75c3c632fcff2c3f573</id>
<content type='text'>
Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D109664
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D109664
</pre>
</div>
</content>
</entry>
<entry>
<title>[docs] [NFC] Removed excess spacing</title>
<updated>2019-07-04T04:41:06+00:00</updated>
<author>
<name>Alex Brachet</name>
<email>alexbrachetmialot@gmail.com</email>
</author>
<published>2019-07-04T04:41:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fa9d232e4389bbd9ca82f8b6b34a1784107835fc'/>
<id>fa9d232e4389bbd9ca82f8b6b34a1784107835fc</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[docs][tools] Add missing "program" tags to rst files</title>
<updated>2019-06-27T13:24:46+00:00</updated>
<author>
<name>James Henderson</name>
<email>jh7370@my.bristol.ac.uk</email>
</author>
<published>2019-06-27T13:24:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a056684c335995214f6d3467c699d32f8e73b763'/>
<id>a056684c335995214f6d3467c699d32f8e73b763</id>
<content type='text'>
Sphinx allows for definitions of command-line options using
`.. option &lt;name&gt;` and references to those options via `:option:&lt;name&gt;`.
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 &lt;name&gt; 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sphinx allows for definitions of command-line options using
`.. option &lt;name&gt;` and references to those options via `:option:&lt;name&gt;`.
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 &lt;name&gt; 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename DEBUG macro to LLVM_DEBUG.</title>
<updated>2018-05-14T12:53:11+00:00</updated>
<author>
<name>Nicola Zaghen</name>
<email>nicola.zaghen@imgtec.com</email>
</author>
<published>2018-05-14T12:53:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d34e60ca8532511acb8c93ef26297e349fbec86a'/>
<id>d34e60ca8532511acb8c93ef26297e349fbec86a</id>
<content type='text'>
    
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[docs] Fixing Sphinx warnings to unclog the buildbot</title>
<updated>2016-07-20T12:16:38+00:00</updated>
<author>
<name>Renato Golin</name>
<email>renato.golin@linaro.org</email>
</author>
<published>2016-07-20T12:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=124f2593fce8b867d3c8dee17bfd3e009b06b67e'/>
<id>124f2593fce8b867d3c8dee17bfd3e009b06b67e</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Delete -std-compile-opts.</title>
<updated>2014-10-16T20:00:02+00:00</updated>
<author>
<name>Rafael Espindola</name>
<email>rafael.espindola@gmail.com</email>
</author>
<published>2014-10-16T20:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=11aaaeebe0c7823d2b541504e83ebfb364bbebf2'/>
<id>11aaaeebe0c7823d2b541504e83ebfb364bbebf2</id>
<content type='text'>
These days -std-compile-opts was just a silly alias for -O3.

llvm-svn: 219951
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These days -std-compile-opts was just a silly alias for -O3.

llvm-svn: 219951
</pre>
</div>
</content>
</entry>
</feed>
