summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Caballero <diego.caballero@intel.com>2018-05-29 23:10:44 +0000
committerDiego Caballero <diego.caballero@intel.com>2018-05-29 23:10:44 +0000
commitb94b21d44102c0911e73d34db90c5bd6cda69c7b (patch)
treeec5aba341feff1695df6a65f12b5f9b92567a4b2
parent5989db0fb4546e062977f3966b16abc831a15010 (diff)
downloadbcm5719-llvm-b94b21d44102c0911e73d34db90c5bd6cda69c7b.tar.gz
bcm5719-llvm-b94b21d44102c0911e73d34db90c5bd6cda69c7b.zip
[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 llvm-svn: 333476
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
index 83c7d236bf7..35100b83a32 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
@@ -24,10 +24,10 @@ static cl::opt<bool> EnableHCFGVerifier("vplan-verify-hcfg", cl::init(false),
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<VPBlockBase *> &VPBlockVec) {
}
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
OpenPOWER on IntegriCloud