[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)
Cristian Assaiante via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 23 04:30:56 PDT 2025
================
@@ -0,0 +1,13 @@
+// REQUIRES: x86-registered-target
+
+// Make sure opt-bisect works through both pass managers
+//
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -O1 %s -mllvm -opt-disable="inlinerpass,SROAPass,machine code sinking" -mllvm -opt-disable-verbose -emit-obj -o /dev/null 2>&1 | FileCheck %s
+
+// CHECK-NOT: DISABLE: running pass InlinerPass
+// CHECK-NOT: DISABLE: running pass SROAPass
+// CHECK-NOT: DISABLE: running pass Machine code sinking
----------------
cristianassaiante wrote:
WIP. Currently the `PassName` provided to the `shouldRunPass` is obtained from the `PassRegistry`. If I understood correctly, you are suggesting to use the names that are used to enable passes in `opt`, which is the `PassArgument` within `PassInfo`.
I'm updating the code so that the `PassArgument` is provided to the gate. To avoid changing the log format of the bisect tool, I will also add a function that finds the `PassName` from the `PassArgument` in the registry.
https://github.com/llvm/llvm-project/pull/145059
More information about the cfe-commits
mailing list