[llvm] f20ff4b - [Attributor] Run IRPosition::verify only with EXPENSIVE_CHECKS
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 21 23:37:18 PDT 2020
Author: Johannes Doerfert
Date: 2020-04-22T01:35:12-05:00
New Revision: f20ff4b17d1927eeffadf3f2fdb1cd6401d94890
URL: https://github.com/llvm/llvm-project/commit/f20ff4b17d1927eeffadf3f2fdb1cd6401d94890
DIFF: https://github.com/llvm/llvm-project/commit/f20ff4b17d1927eeffadf3f2fdb1cd6401d94890.diff
LOG: [Attributor] Run IRPosition::verify only with EXPENSIVE_CHECKS
Added:
Modified:
llvm/lib/Transforms/IPO/Attributor.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index e715d04c0d1e..ba08061be9d3 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -400,6 +400,7 @@ bool IRPosition::getAttrsFromAssumes(Attribute::AttrKind AK,
}
void IRPosition::verify() {
+#ifdef EXPENSIVE_CHECKS
switch (KindOrArgNo) {
default:
assert(KindOrArgNo >= 0 && "Expected argument or call site argument!");
@@ -447,6 +448,7 @@ void IRPosition::verify() {
assert(AnchorVal == &getAssociatedValue() && "Associated value mismatch!");
break;
}
+#endif
}
Optional<Constant *>
More information about the llvm-commits
mailing list