[llvm] [NewPM] Fix OptBisect Functionality for disabled gate (PR #225437)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 08:54:26 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
We were never actually checking if the gate was enabled. This patch
fixes it to match the behavior of the LegacyPM.
---
Full diff: https://github.com/llvm/llvm-project/pull/225437.diff
1 Files Affected:
- (modified) llvm/lib/IR/PassManager.cpp (+2-1)
``````````diff
diff --git a/llvm/lib/IR/PassManager.cpp b/llvm/lib/IR/PassManager.cpp
index dca3c0e8fbc9f..8307906cc39a4 100644
--- a/llvm/lib/IR/PassManager.cpp
+++ b/llvm/lib/IR/PassManager.cpp
@@ -32,7 +32,8 @@ bool detail::shouldSkipOptimizationForOptBisect(IRUnitRef IR,
} else {
llvm_unreachable("Tried to check skipping for an invalid IR type");
}
- return Ctx->getOptPassGate().shouldRunPass(PassName, IRName);
+ const OptPassGate &Gate = Ctx->getOptPassGate();
+ return Gate.isEnabled() && !Gate.shouldRunPass(PassName, IRName);
}
// Explicit template instantiations and specialization defininitions for core
``````````
</details>
https://github.com/llvm/llvm-project/pull/225437
More information about the llvm-commits
mailing list