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

llvm-svn: 309723
This commit is contained in:
Davide Italiano 2017-08-01 19:07:20 +00:00
parent c6cb382a99
commit 53e0e0b017

View File

@ -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::doInitialization(Module &M) {
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::isVec3ToVec4Shuffle(Type *Ty0, Type* Ty1) const
return DL->getTypeSizeInBits(VT0->getElementType()) ==
DL->getTypeSizeInBits(VT1->getElementType());
}
#endif
bool AMDGPURewriteOutArguments::runOnFunction(Function &F) {
if (skipFunction(F))