[llvm] r355733 - [RegionPass] Fix forgotten "!".
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 13:03:06 PST 2019
Author: meinersbur
Date: Fri Mar 8 13:03:06 2019
New Revision: 355733
URL: http://llvm.org/viewvc/llvm-project?rev=355733&view=rev
Log:
[RegionPass] Fix forgotten "!".
Commit r355068 "Fix IR/Analysis layering issue with OptBisect" uses the
template
return Gate.isEnabled() && !Gate.shouldRunPass(this, getDescription(...));
for all pass kinds. For the RegionPass, it left out the not operator,
causing region passes to be skipped as soon as a pass gate is used.
Modified:
llvm/trunk/lib/Analysis/RegionPass.cpp
Modified: llvm/trunk/lib/Analysis/RegionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/RegionPass.cpp?rev=355733&r1=355732&r2=355733&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/RegionPass.cpp (original)
+++ llvm/trunk/lib/Analysis/RegionPass.cpp Fri Mar 8 13:03:06 2019
@@ -285,7 +285,7 @@ static std::string getDescription(const
bool RegionPass::skipRegion(Region &R) const {
Function &F = *R.getEntry()->getParent();
OptPassGate &Gate = F.getContext().getOptPassGate();
- if (Gate.isEnabled() && Gate.shouldRunPass(this, getDescription(R)))
+ if (Gate.isEnabled() && !Gate.shouldRunPass(this, getDescription(R)))
return true;
if (F.hasFnAttribute(Attribute::OptimizeNone)) {
More information about the llvm-commits
mailing list