Lines Matching refs:Arg
105 void handleByValParam(Argument *Arg);
143 void NVPTXLowerKernelArgs::handleByValParam(Argument *Arg) { in handleByValParam() argument
144 Function *Func = Arg->getParent(); in handleByValParam()
146 PointerType *PType = dyn_cast<PointerType>(Arg->getType()); in handleByValParam()
151 AllocaInst *AllocA = new AllocaInst(StructType, Arg->getName(), FirstInst); in handleByValParam()
155 AllocA->setAlignment(Func->getParamAlignment(Arg->getArgNo() + 1)); in handleByValParam()
156 Arg->replaceAllUsesWith(AllocA); in handleByValParam()
159 Arg, PointerType::get(StructType, ADDRESS_SPACE_PARAM), Arg->getName(), in handleByValParam()
161 LoadInst *LI = new LoadInst(ArgInParam, Arg->getName(), FirstInst); in handleByValParam()
171 if (Argument *Arg = dyn_cast<Argument>(Ptr)) { in markPointerAsGlobal() local
173 InsertPt = Arg->getParent()->getEntryBlock().begin(); in markPointerAsGlobal()
208 if (Argument *Arg = dyn_cast<Argument>(UO)) { in runOnFunction() local
209 if (Arg->hasByValAttr()) { in runOnFunction()
220 for (Argument &Arg : F.args()) { in runOnFunction()
221 if (Arg.getType()->isPointerTy()) { in runOnFunction()
222 if (Arg.hasByValAttr()) in runOnFunction()
223 handleByValParam(&Arg); in runOnFunction()
225 markPointerAsGlobal(&Arg); in runOnFunction()