Lines Matching refs:Arg
105 bool checkArgumentUses(Value &Arg) const;
106 bool isOutArgumentCandidate(Argument &Arg) const;
136 bool AMDGPURewriteOutArguments::checkArgumentUses(Value &Arg) const { in checkArgumentUses()
140 for (Use &U : Arg.uses()) { in checkArgumentUses()
158 Type *SrcEltTy = Arg.getType()->getPointerElementType(); in checkArgumentUses()
189 bool AMDGPURewriteOutArguments::isOutArgumentCandidate(Argument &Arg) const { in isOutArgumentCandidate()
191 PointerType *ArgTy = dyn_cast<PointerType>(Arg.getType()); in isOutArgumentCandidate()
196 Arg.hasByValAttr() || Arg.hasStructRetAttr() || in isOutArgumentCandidate()
201 return checkArgumentUses(Arg); in isOutArgumentCandidate()
250 for (Argument &Arg : F.args()) { in runOnFunction()
251 if (isOutArgumentCandidate(Arg)) { in runOnFunction()
252 LLVM_DEBUG(dbgs() << "Found possible out argument " << Arg in runOnFunction()
254 OutArgs.push_back(&Arg); in runOnFunction()
398 Argument *Arg = ReturnPoint.first; in runOnFunction() local
400 Type *EltTy = Arg->getType()->getPointerElementType(); in runOnFunction()
434 for (Argument &Arg : F.args()) { in runOnFunction()
435 if (OutArgIndexes.count(Arg.getArgNo())) { in runOnFunction()
438 StubCallArgs.push_back(UndefValue::get(Arg.getType())); in runOnFunction()
440 StubCallArgs.push_back(&Arg); in runOnFunction()
449 for (Argument &Arg : F.args()) { in runOnFunction()
450 if (!OutArgIndexes.count(Arg.getArgNo())) in runOnFunction()
453 PointerType *ArgType = cast<PointerType>(Arg.getType()); in runOnFunction()
456 unsigned Align = Arg.getParamAlignment(); in runOnFunction()
464 Value *PtrVal = B.CreateBitCast(&Arg, PtrTy); in runOnFunction()