Lines Matching refs:CI
58 getBranchWeight(Intrinsic::ID IntrinsicID, CallInst *CI, int BranchCount) { in getBranchWeight() argument
65 assert(CI->getNumOperands() >= 3 && in getBranchWeight()
67 ConstantFP *Confidence = dyn_cast<ConstantFP>(CI->getArgOperand(2)); in getBranchWeight()
79 CallInst *CI = dyn_cast<CallInst>(SI.getCondition()); in handleSwitchExpect() local
80 if (!CI) in handleSwitchExpect()
83 Function *Fn = CI->getCalledFunction(); in handleSwitchExpect()
88 Value *ArgValue = CI->getArgOperand(0); in handleSwitchExpect()
89 ConstantInt *ExpectedValue = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in handleSwitchExpect()
97 getBranchWeight(Fn->getIntrinsicID(), CI, n + 1); in handleSwitchExpect()
107 MDBuilder(CI->getContext()).createBranchWeights(Weights)); in handleSwitchExpect()
208 ConstantInt *CI = dyn_cast<ConstantInt>(PhiOpnd); in handlePhiDef() local
209 if (!CI) in handlePhiDef()
215 if (ExpectedPhiValue == ApplyOperations(CI->getValue())) in handlePhiDef()
272 CallInst *CI; in handleBrSelExpect() local
278 CI = dyn_cast<CallInst>(BSI.getCondition()); in handleBrSelExpect()
288 CI = dyn_cast<CallInst>(CmpI->getOperand(0)); in handleBrSelExpect()
291 if (!CI) in handleBrSelExpect()
301 Function *Fn = CI->getCalledFunction(); in handleBrSelExpect()
306 Value *ArgValue = CI->getArgOperand(0); in handleBrSelExpect()
307 ConstantInt *ExpectedValue = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in handleBrSelExpect()
311 MDBuilder MDB(CI->getContext()); in handleBrSelExpect()
316 getBranchWeight(Fn->getIntrinsicID(), CI, 2); in handleBrSelExpect()
362 CallInst *CI = dyn_cast<CallInst>(Inst); in lowerExpectIntrinsic() local
363 if (!CI) { in lowerExpectIntrinsic()
371 Function *Fn = CI->getCalledFunction(); in lowerExpectIntrinsic()
377 handlePhiDef(CI); in lowerExpectIntrinsic()
378 Value *Exp = CI->getArgOperand(0); in lowerExpectIntrinsic()
379 CI->replaceAllUsesWith(Exp); in lowerExpectIntrinsic()
380 CI->eraseFromParent(); in lowerExpectIntrinsic()