Lines Matching defs:aCI
84 bool sincosUseNative(CallInst *aCI, const FuncInfo &FInfo);
89 bool evaluateCall(CallInst *aCI, const FuncInfo &FInfo);
454 bool AMDGPULibCalls::sincosUseNative(CallInst *aCI, const FuncInfo &FInfo) {
459 Module *M = aCI->getModule();
460 Value *opr0 = aCI->getArgOperand(0);
475 CallInst::Create(sinExpr, opr0, "splitsin", aCI->getIterator());
477 CallInst::Create(cosExpr, opr0, "splitcos", aCI->getIterator());
478 new StoreInst(cosval, aCI->getArgOperand(1), aCI->getIterator());
480 DEBUG_WITH_TYPE("usenative", dbgs() << "<useNative> replace " << *aCI
483 replaceCall(aCI, sinval);
490 bool AMDGPULibCalls::useNative(CallInst *aCI) {
491 Function *Callee = aCI->getCalledFunction();
492 if (!Callee || aCI->isNoBuiltin())
504 return sincosUseNative(aCI, FInfo);
507 FunctionCallee F = getFunction(aCI->getModule(), FInfo);
511 aCI->setCalledFunction(F);
512 DEBUG_WITH_TYPE("usenative", dbgs() << "<useNative> replace " << *aCI
1625 bool AMDGPULibCalls::evaluateCall(CallInst *aCI, const FuncInfo &FInfo) {
1626 int numArgs = (int)aCI->arg_size();
1633 if ((copr0 = dyn_cast<Constant>(aCI->getArgOperand(0))) == nullptr)
1638 if ((copr1 = dyn_cast<Constant>(aCI->getArgOperand(1))) == nullptr) {
1644 // At this point, all arguments to aCI are constants.
1666 LLVMContext &context = aCI->getContext();
1669 nval0 = ConstantFP::get(aCI->getType(), DVal0[0]);
1671 nval1 = ConstantFP::get(aCI->getType(), DVal1[0]);
1699 new StoreInst(nval1, aCI->getArgOperand(1), aCI->getIterator());
1702 replaceCall(aCI, nval0);