[llvm] [NFC] Clarify the syntax of passes flag (PR #136175)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 12:00:26 PDT 2025


https://github.com/hiraditya updated https://github.com/llvm/llvm-project/pull/136175

>From 67cd7572fc67724aaba9cc36288f5227aa16fe02 Mon Sep 17 00:00:00 2001
From: AdityaK <hiraditya at msn.com>
Date: Thu, 17 Apr 2025 10:46:24 -0700
Subject: [PATCH] Clarify the syntax of passes flag

---
 llvm/tools/opt/optdriver.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/llvm/tools/opt/optdriver.cpp b/llvm/tools/opt/optdriver.cpp
index 78ed1662682d9..5ca4d883697f0 100644
--- a/llvm/tools/opt/optdriver.cpp
+++ b/llvm/tools/opt/optdriver.cpp
@@ -84,8 +84,12 @@ static cl::opt<bool> EnableLegacyPassManager(
 static cl::opt<std::string> PassPipeline(
     "passes",
     cl::desc(
-        "A textual description of the pass pipeline. To have analysis passes "
-        "available before a certain pass, add \"require<foo-analysis>\"."));
+        "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 "
+        "https://llvm.org/docs/NewPassManager.html#invoking-opt "
+        "for more details on the pass pipeline syntax. "));
+
 static cl::alias PassPipeline2("p", cl::aliasopt(PassPipeline),
                                cl::desc("Alias for -passes"));
 



More information about the llvm-commits mailing list