[llvm] [Docs] Update Opt's Option to Specify Pass Pipeline (NFC) (PR #148402)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 12 14:54:05 PDT 2025


https://github.com/veera-efficient created https://github.com/llvm/llvm-project/pull/148402

Since the new pass manager, we use `--passes=<string>` to specify the pass pipeline instead of the `-{passname}` syntax.

>From ed3f0fef580617a3dbd5e6dd2ed50f97af362656 Mon Sep 17 00:00:00 2001
From: veera <veera at efficient.computer>
Date: Sat, 12 Jul 2025 14:10:40 -0700
Subject: [PATCH] [Docs] Update Opt's Option to Specify Pass Pipeline (NFC)

Since the new pass manager, we use `--passes=<string>` to specify
the pass pipeline instead of the `-{passname}` syntax.
---
 llvm/docs/CommandGuide/opt.rst | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/llvm/docs/CommandGuide/opt.rst b/llvm/docs/CommandGuide/opt.rst
index f067f6253a199..9c491ff0cd809 100644
--- a/llvm/docs/CommandGuide/opt.rst
+++ b/llvm/docs/CommandGuide/opt.rst
@@ -46,12 +46,13 @@ OPTIONS
 
  Write output in LLVM intermediate language (instead of bitcode).
 
-.. option:: -{passname}
+.. option:: --passes=<string>
 
- :program:`opt` provides the ability to run any of LLVM's optimization or
- analysis passes in any order.  The :option:`-help` option lists all the passes
- available.  The order in which the options occur on the command line are the
- order in which they are executed (within pass constraints).
+ A textual (comma separated) description of the pass pipeline
+ e.g.,-passes="foo,bar", to have analysis passes available before a pass, add
+ "require<foo-analysis>". See `Using the New Pass Manager
+ <../NewPassManager.html>`_, section ``#invoking-opt`` for more details on the
+ pass pipeline syntax.
 
 .. option:: -strip-debug
 



More information about the llvm-commits mailing list