• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/llvmCore-3425.0.34/lib/Transforms/InstCombine/

Lines Matching refs:CI

193 Instruction *InstCombiner::visitCallInst(CallInst &CI) {
194 if (isFreeCall(&CI, TLI))
195 return visitFree(CI);
199 if (CI.getParent()->getParent()->doesNotThrow() &&
200 !CI.doesNotThrow()) {
201 CI.setDoesNotThrow();
202 return &CI;
205 IntrinsicInst *II = dyn_cast<IntrinsicInst>(&CI);
206 if (!II) return visitCallSite(&CI);
216 return EraseInstFromFunction(CI);
218 if (ConstantInt *CI = dyn_cast<ConstantInt>(NumBytes))
219 if (CI->getZExtValue() == 1) {
236 Module *M = CI.getParent()->getParent()->getParent();
238 Type *Tys[3] = { CI.getArgOperand(0)->getType(),
239 CI.getArgOperand(1)->getType(),
240 CI.getArgOperand(2)->getType() };
241 CI.setCalledFunction(Intrinsic::getDeclaration(M, MemCpyID, Tys));
249 return EraseInstFromFunction(CI);
270 return ReplaceInstUsesWith(CI, ConstantInt::get(CI.getType(), Size));
277 return ReplaceInstUsesWith(CI, Operand->getArgOperand(0));
296 return ReplaceInstUsesWith(CI, ConstantFP::get(CI.getType(), 1.0));
299 return ReplaceInstUsesWith(CI, II->getArgOperand(0));
302 return BinaryOperator::CreateFDiv(ConstantFP::get(CI.getType(), 1.0),
319 return ReplaceInstUsesWith(CI, ConstantInt::get(IT,
337 return ReplaceInstUsesWith(CI, ConstantInt::get(IT,
362 Add->takeName(&CI);
376 Add->takeName(&CI);
400 return ReplaceInstUsesWith(CI, UndefValue::get(II->getType()));
421 return ReplaceInstUsesWith(CI, UndefValue::get(II->getType()));
477 return ReplaceInstUsesWith(CI, UndefValue::get(II->getType()));
482 return ReplaceInstUsesWith(CI, Constant::getNullValue(II->getType()));
617 return CastInst::Create(Instruction::BitCast, Result, CI.getType());
655 return ReplaceInstUsesWith(CI, ConstantAggregateZero::get(II->getType()));
676 return ReplaceInstUsesWith(CI, ConstantVector::get(NewElems));
706 return EraseInstFromFunction(CI);
724 return EraseInstFromFunction(CI);
739 return EraseInstFromFunction(CI);
756 const CastInst * const CI,
759 if (!CI->isLosslessCast())
769 cast<PointerType>(CI->getOperand(0)->getType())->getElementType();
770 Type* DstTy = cast<PointerType>(CI->getType())->getElementType();
783 NewInstruction = IC->ReplaceInstUsesWith(*CI, With);
786 if (CI->getArgOperand(SizeCIOp) == CI->getArgOperand(SizeArgOp))
789 dyn_cast<ConstantInt>(CI->getArgOperand(SizeCIOp))) {
793 uint64_t Len = GetStringLength(CI->getArgOperand(SizeArgOp));
800 CI->getArgOperand(SizeArgOp)))
815 Instruction *InstCombiner::tryOptimizeCall(CallInst *CI, const TargetData *TD) {
816 if (CI->getCalledFunction() == 0) return 0;
819 Simplifier.fold(CI, TD, TLI);
973 CastInst *CI = dyn_cast<CastInst>(*I);
974 if (CI && isSafeToEliminateVarargsCast(CS, CI, TD, ix)) {
975 *I = CI->getOperand(0);
990 if (CallInst *CI = dyn_cast<CallInst>(CS.getInstruction())) {
991 Instruction *I = tryOptimizeCall(CI, TD);
1212 CallInst *CI = cast<CallInst>(Caller);
1214 NC->takeName(CI);
1215 if (CI->isTailCall())
1217 cast<CallInst>(NC)->setCallingConv(CI->getCallingConv());