[llvm] r309723 - [AMDGPU] Put a function used only inside assert() under NDEBUG.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 12:07:21 PDT 2017


Author: davide
Date: Tue Aug  1 12:07:20 2017
New Revision: 309723

URL: http://llvm.org/viewvc/llvm-project?rev=309723&view=rev
Log:
[AMDGPU] Put a function used only inside assert() under NDEBUG.

Modified:
    llvm/trunk/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp?rev=309723&r1=309722&r2=309723&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp Tue Aug  1 12:07:20 2017
@@ -86,7 +86,9 @@ private:
   bool checkArgumentUses(Value &Arg) const;
   bool isOutArgumentCandidate(Argument &Arg) const;
 
+#ifndef NDEBUG
   bool isVec3ToVec4Shuffle(Type *Ty0, Type* Ty1) const;
+#endif
 public:
   static char ID;
 
@@ -185,6 +187,7 @@ bool AMDGPURewriteOutArguments::doInitia
   return false;
 }
 
+#ifndef NDEBUG
 bool AMDGPURewriteOutArguments::isVec3ToVec4Shuffle(Type *Ty0, Type* Ty1) const {
   VectorType *VT0 = dyn_cast<VectorType>(Ty0);
   VectorType *VT1 = dyn_cast<VectorType>(Ty1);
@@ -198,6 +201,7 @@ bool AMDGPURewriteOutArguments::isVec3To
   return DL->getTypeSizeInBits(VT0->getElementType()) ==
          DL->getTypeSizeInBits(VT1->getElementType());
 }
+#endif
 
 bool AMDGPURewriteOutArguments::runOnFunction(Function &F) {
   if (skipFunction(F))




More information about the llvm-commits mailing list