[PATCH] D95335: [Verifier] enable and limit llvm.experimental.noalias.scope.decl dominance checking
Jeroen Dobbelaere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 07:20:32 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6e530a3dac0c: [Verifier] enable and limit llvm.experimental.noalias.scope.decl dominance… (authored by jeroen.dobbelaere).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95335/new/
https://reviews.llvm.org/D95335
Files:
llvm/lib/IR/Verifier.cpp
Index: llvm/lib/IR/Verifier.cpp
===================================================================
--- llvm/lib/IR/Verifier.cpp
+++ llvm/lib/IR/Verifier.cpp
@@ -116,7 +116,7 @@
using namespace llvm;
static cl::opt<bool> VerifyNoAliasScopeDomination(
- "verify-noalias-scope-decl-dom", cl::Hidden, cl::init(false),
+ "verify-noalias-scope-decl-dom", cl::Hidden, cl::init(true),
cl::desc("Ensure that llvm.experimental.noalias.scope.decl for identical "
"scopes are not dominating"));
@@ -5587,18 +5587,17 @@
} while (ItNext != NoAliasScopeDecls.end() &&
GetScope(*ItNext) == CurScope);
- // [ItCurrent, ItNext[ represents the declarations for the same scope.
- // Ensure they are not dominating each other
- for (auto *I : llvm::make_range(ItCurrent, ItNext)) {
- for (auto *J : llvm::make_range(ItCurrent, ItNext)) {
- if (I != J) {
- Assert(!DT.dominates(I, J),
- "llvm.experimental.noalias.scope.decl dominates another one "
- "with the same scope",
- I);
- }
- }
- }
+ // [ItCurrent, ItNext) represents the declarations for the same scope.
+ // Ensure they are not dominating each other.. but only if it is not too
+ // expensive.
+ if (ItNext - ItCurrent < 32)
+ for (auto *I : llvm::make_range(ItCurrent, ItNext))
+ for (auto *J : llvm::make_range(ItCurrent, ItNext))
+ if (I != J)
+ Assert(!DT.dominates(I, J),
+ "llvm.experimental.noalias.scope.decl dominates another one "
+ "with the same scope",
+ I);
ItCurrent = ItNext;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95335.319003.patch
Type: text/x-patch
Size: 1689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210125/a94ee391/attachment.bin>
More information about the llvm-commits
mailing list