[all-commits] [llvm/llvm-project] 81eb7d: [OptBisect][IR] Adding a new OptPassGate for disab...
Cristian Assaiante via All-commits
all-commits at lists.llvm.org
Wed Jul 16 16:52:20 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 81eb7defa23dcf48a8e51391543eb210df232440
https://github.com/llvm/llvm-project/commit/81eb7defa23dcf48a8e51391543eb210df232440
Author: Cristian Assaiante <assaiante at diag.uniroma1.it>
Date: 2025-07-16 (Wed, 16 Jul 2025)
Changed paths:
M clang/test/CodeGen/new-pass-manager-opt-bisect.c
M llvm/include/llvm/IR/OptBisect.h
M llvm/include/llvm/Pass.h
M llvm/lib/IR/OptBisect.cpp
M llvm/lib/IR/Pass.cpp
M llvm/lib/Passes/StandardInstrumentations.cpp
M llvm/test/Other/opt-bisect-new-pass-manager.ll
A llvm/test/Other/opt-disable.ll
Log Message:
-----------
[OptBisect][IR] Adding a new OptPassGate for disabling passes via name (#145059)
This commit adds a new pass gate that allows selective disabling
of one or more passes via the clang command line using the
`-opt-disable` option. Passes to be disabled should be specified as a
comma-separated list of their names.
The implementation resides in the same file as the bisection tool. The
`getGlobalPassGate()` function returns the currently enabled gate.
Example: `-opt-disable="PassA,PassB"`
Pass names are matched using case-insensitive comparisons. However, note
that special characters, including spaces, must be included exactly as
they appear in the pass names.
Additionally, a `-opt-disable-enable-verbosity` flag has been introduced to
enable verbose output when this functionality is in use. When enabled,
it prints the status of all passes (either running or NOT running),
similar to the default behavior of `-opt-bisect-limit`. This flag is
disabled by default, which is the opposite of the `-opt-bisect-verbose`
flag (which defaults to enabled).
To validate this functionality, a test file has also been provided. It reuses
the same infrastructure as the opt-bisect test, but disables three
specific passes and checks the output to ensure the expected behavior.
---------
Co-authored-by: Nikita Popov <github at npopov.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list