Lines Matching refs:CI
67 virtual void visitCallInst(CallInst &CI);
73 void visitCallConvert(CallInst *CI, StringRef MangledName, Op OC);
80 void visitCallDecorate(CallInst *CI, StringRef MangledName);
85 void visitCallSubGroupBarrier(CallInst *CI);
90 void transBuiltin(CallInst *CI, Op OC);
142 OCL21ToSPIRV::visitCallInst(CallInst& CI) { in visitCallInst() argument
143 DEBUG(dbgs() << "[visistCallInst] " << CI << '\n'); in visitCallInst()
144 auto F = CI.getCalledFunction(); in visitCallInst()
153 visitCallSubGroupBarrier(&CI); in visitCallInst()
169 visitCallConvert(&CI, MangledName, OC); in visitCallInst()
173 visitCallDecorate(&CI, MangledName); in visitCallInst()
176 transBuiltin(&CI, OC); in visitCallInst()
179 void OCL21ToSPIRV::visitCallConvert(CallInst* CI, in visitCallConvert() argument
181 AttributeSet Attrs = CI->getCalledFunction()->getAttributes(); in visitCallConvert()
182 mutateCallInstSPIRV(M, CI, [=](CallInst *, std::vector<Value *> &Args){ in visitCallConvert()
185 getPostfixForReturnType(CI, in visitCallConvert()
188 ValuesToDelete.insert(CI); in visitCallConvert()
189 ValuesToDelete.insert(CI->getCalledFunction()); in visitCallConvert()
192 void OCL21ToSPIRV::visitCallDecorate(CallInst* CI, in visitCallDecorate() argument
194 auto Target = cast<CallInst>(CI->getArgOperand(0)); in visitCallDecorate()
201 getPostfix(getArgAsDecoration(CI, 1), getArgAsInt(CI, 2)), in visitCallDecorate()
202 getTypes(getArguments(CI)), &Info)); in visitCallDecorate()
203 CI->replaceAllUsesWith(Target); in visitCallDecorate()
204 ValuesToDelete.insert(CI); in visitCallDecorate()
205 ValuesToDelete.insert(CI->getCalledFunction()); in visitCallDecorate()
209 OCL21ToSPIRV::visitCallSubGroupBarrier(CallInst *CI) { in visitCallSubGroupBarrier() argument
210 DEBUG(dbgs() << "[visitCallSubGroupBarrier] "<< *CI << '\n'); in visitCallSubGroupBarrier()
211 auto Lit = getBarrierLiterals(CI); in visitCallSubGroupBarrier()
212 AttributeSet Attrs = CI->getCalledFunction()->getAttributes(); in visitCallSubGroupBarrier()
213 mutateCallInstSPIRV(M, CI, [=](CallInst *, std::vector<Value *> &Args){ in visitCallSubGroupBarrier()
223 OCL21ToSPIRV::transBuiltin(CallInst* CI, Op OC) { in transBuiltin() argument
224 AttributeSet Attrs = CI->getCalledFunction()->getAttributes(); in transBuiltin()
226 mutateCallInstSPIRV(M, CI, [=](CallInst *, std::vector<Value *> &Args){ in transBuiltin()
229 ValuesToDelete.insert(CI); in transBuiltin()
230 ValuesToDelete.insert(CI->getCalledFunction()); in transBuiltin()