[PATCH] D47498: [VPlan] Replace LLVM_ATTRIBUTE_USED with ifndef NDEBUG

Diego Caballero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 29 16:14:47 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL333476: [VPlan] Replace LLVM_ATTRIBUTE_USED with ifndef NDEBUG (authored by dcaballe, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D47498?vs=148987&id=149002#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D47498

Files:
  llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp


Index: llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp
+++ llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp
@@ -24,18 +24,19 @@
                                         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))
       return true;
     VPBlockSet.insert(Block);
   }
   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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47498.149002.patch
Type: text/x-patch
Size: 1054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180529/2369af97/attachment.bin>


More information about the llvm-commits mailing list