From 54d98bd75ecb2c1e4610425fb952003abd0385d2 Mon Sep 17 00:00:00 2001 From: Akash Kothari <akashk4@tyler.cs.illinois.edu> Date: Tue, 14 Jan 2020 13:53:31 -0600 Subject: [PATCH] Fixes to generated warnings when compiling DFG2LLVM_NVPTX pass --- hpvm/lib/Transforms/DFG2LLVM_NVPTX/DFG2LLVM_NVPTX.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hpvm/lib/Transforms/DFG2LLVM_NVPTX/DFG2LLVM_NVPTX.cpp b/hpvm/lib/Transforms/DFG2LLVM_NVPTX/DFG2LLVM_NVPTX.cpp index 4796c806f3..6b0fb68e77 100644 --- a/hpvm/lib/Transforms/DFG2LLVM_NVPTX/DFG2LLVM_NVPTX.cpp +++ b/hpvm/lib/Transforms/DFG2LLVM_NVPTX/DFG2LLVM_NVPTX.cpp @@ -1203,7 +1203,7 @@ void CGT_NVPTX::codeGen(DFLeafNode* N) { // These three intrinsics need to be consecutive x,y,z uint64_t dim = II->getIntrinsicID() - Intrinsic::visc_getNodeInstanceID_x; - assert((dim >= 0) && (dim < 3) && "Invalid dimension argument"); + assert((dim < 3) && "Invalid dimension argument"); DEBUG(errs() << "\t dimension = " << dim << "\n"); // Argument of the function to be called @@ -1287,7 +1287,7 @@ void CGT_NVPTX::codeGen(DFLeafNode* N) { // These three intrinsics need to be consecutive x,y,z uint64_t dim = II->getIntrinsicID() - Intrinsic::visc_getNumNodeInstances_x; - assert((dim >= 0) && (dim < 3) && "Invalid dimension argument"); + assert((dim < 3) && "Invalid dimension argument"); DEBUG(errs() << "\t dimension = " << dim << "\n"); // Argument of the function to be called @@ -1441,8 +1441,8 @@ void CGT_NVPTX::codeGen(DFLeafNode* N) { for(unsigned i=0; i < CI->getNumArgOperands(); i++) { Value* V = CI->getArgOperand(i); // Either the type should match or both should be of pointer type - assert(V->getType() == FTy->getParamType(i) || - (V->getType()->isPointerTy() && FTy->getParamType(i)->isPointerTy()) + assert((V->getType() == FTy->getParamType(i) || + (V->getType()->isPointerTy() && FTy->getParamType(i)->isPointerTy())) && "Dummy function call argument does not match with Intrinsic argument!"); // If the types do not match, then both must be pointer type and pointer // cast needs to be performed @@ -1685,8 +1685,6 @@ Function* CGT_NVPTX::transformFunctionToVoid(Function* F) { DEBUG(errs() << "\tCreated parameter: " << *RetArg << "\n"); } - Function::arg_iterator ai, ae; - DEBUG(errs() << "\tReplacing Return statements\n"); // Replace return statements with extractValue and store instructions for (std::vector<ReturnInst *>::iterator rii = RItoRemove.begin(), -- GitLab