[llvm] r333476 - [VPlan] Replace LLVM_ATTRIBUTE_USED with ifndef NDEBUG
Diego Caballero via llvm-commits
llvm-commits at lists.llvm.org
Tue May 29 16:10:44 PDT 2018
Author: dcaballe
Date: Tue May 29 16:10:44 2018
New Revision: 333476
URL: http://llvm.org/viewvc/llvm-project?rev=333476&view=rev
Log:
[VPlan] Replace LLVM_ATTRIBUTE_USED with ifndef NDEBUG
Minor replacement. LLVM_ATTRIBUTE_USED was introduced to silence
a warning but using #ifndef NDEBUG makes more sense in this case.
Reviewers: dblaikie, fhahn, hsaito
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D47498
Modified:
llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp?rev=333476&r1=333475&r2=333476&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp Tue May 29 16:10:44 2018
@@ -24,10 +24,10 @@ static cl::opt<bool> EnableHCFGVerifier(
cl::Hidden,
cl::desc("Verify VPlan H-CFG."));
+#ifndef NDEBUG
/// Utility function that checks whether \p VPBlockVec has duplicate
/// VPBlockBases.
-LLVM_ATTRIBUTE_USED static bool
-hasDuplicates(const SmallVectorImpl<VPBlockBase *> &VPBlockVec) {
+static bool hasDuplicates(const SmallVectorImpl<VPBlockBase *> &VPBlockVec) {
SmallDenseSet<const VPBlockBase *, 8> VPBlockSet;
for (const auto *Block : VPBlockVec) {
if (VPBlockSet.count(Block))
@@ -36,6 +36,7 @@ hasDuplicates(const SmallVectorImpl<VPBl
}
return false;
}
+#endif
/// Helper function that verifies the CFG invariants of the VPBlockBases within
/// \p Region. Checks in this function are generic for VPBlockBases. They are
More information about the llvm-commits
mailing list