================ @@ -55,4 +72,29 @@ bool OptBisect::shouldRunPass(StringRef PassName, return ShouldRun; } -OptPassGate &llvm::getGlobalPassGate() { return getOptBisector(); } +static void printDisablePassMessage(const StringRef &Name, StringRef TargetDesc, + bool Running) { + StringRef Status = Running ? "" : "NOT "; + dbgs() << "OptDisable: " << Status << "running pass " << Name << " on " + << TargetDesc << "\n"; +} + +void OptDisable::setDisabled(StringRef Pass) { + DisabledPasses.insert(Pass.lower()); +} + +bool OptDisable::shouldRunPass(StringRef PassName, + StringRef IRDescription) const { + assert(isEnabled()); + + const bool ShouldRun = !DisabledPasses.contains(PassName.lower()); ---------------- nikic wrote:
```suggestion const bool ShouldRun = !DisabledPasses.contains(PassName); ``` Now that this is using pass names, I think it's best to be case sensitive (they are lowercase). https://github.com/llvm/llvm-project/pull/145059 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits