reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/CodeGen/IntrinsicLowering.cpp
  235   IRBuilder<> Builder(CI);
  236   LLVMContext &Context = CI->getContext();
  238   const Function *Callee = CI->getCalledFunction();
  241   CallSite CS(CI);
  252     Value *V = CI->getArgOperand(0);
  253     CI->replaceAllUsesWith(V);
  262     Value *V = ReplaceCallWith("setjmp", CI, CS.arg_begin(), CS.arg_end(),
  264     if (!CI->getType()->isVoidTy())
  265       CI->replaceAllUsesWith(V);
  269      if (!CI->getType()->isVoidTy())
  270        CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
  270        CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
  274     ReplaceCallWith("longjmp", CI, CS.arg_begin(), CS.arg_end(),
  281     ReplaceCallWith("abort", CI, CS.arg_end(), CS.arg_end(),
  286     CI->replaceAllUsesWith(LowerCTPOP(Context, CI->getArgOperand(0), CI));
  286     CI->replaceAllUsesWith(LowerCTPOP(Context, CI->getArgOperand(0), CI));
  286     CI->replaceAllUsesWith(LowerCTPOP(Context, CI->getArgOperand(0), CI));
  290     CI->replaceAllUsesWith(LowerBSWAP(Context, CI->getArgOperand(0), CI));
  290     CI->replaceAllUsesWith(LowerBSWAP(Context, CI->getArgOperand(0), CI));
  290     CI->replaceAllUsesWith(LowerBSWAP(Context, CI->getArgOperand(0), CI));
  294     CI->replaceAllUsesWith(LowerCTLZ(Context, CI->getArgOperand(0), CI));
  294     CI->replaceAllUsesWith(LowerCTLZ(Context, CI->getArgOperand(0), CI));
  294     CI->replaceAllUsesWith(LowerCTLZ(Context, CI->getArgOperand(0), CI));
  299     Value *Src = CI->getArgOperand(0);
  304     Src = LowerCTPOP(Context, Builder.CreateAnd(NotSrc, SrcM1), CI);
  305     CI->replaceAllUsesWith(Src);
  317       CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
  317       CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
  326     CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 0));
  326     CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 0));
  333     CI->replaceAllUsesWith(
  334         ConstantPointerNull::get(cast<PointerType>(CI->getType())));
  339     CI->replaceAllUsesWith(
  340         ConstantPointerNull::get(cast<PointerType>(CI->getType())));
  351     CI->replaceAllUsesWith(ConstantInt::get(Type::getInt64Ty(Context), 0));
  361     CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1));
  361     CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1));
  367     CI->replaceAllUsesWith(CI->getOperand(0));
  367     CI->replaceAllUsesWith(CI->getOperand(0));
  376     Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr,
  379     Ops[0] = CI->getArgOperand(0);
  380     Ops[1] = CI->getArgOperand(1);
  382     ReplaceCallWith("memcpy", CI, Ops, Ops+3, CI->getArgOperand(0)->getType());
  382     ReplaceCallWith("memcpy", CI, Ops, Ops+3, CI->getArgOperand(0)->getType());
  387     Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr,
  390     Ops[0] = CI->getArgOperand(0);
  391     Ops[1] = CI->getArgOperand(1);
  393     ReplaceCallWith("memmove", CI, Ops, Ops+3, CI->getArgOperand(0)->getType());
  393     ReplaceCallWith("memmove", CI, Ops, Ops+3, CI->getArgOperand(0)->getType());
  397     Value *Op0 = CI->getArgOperand(0);
  399     Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr,
  404     Ops[1] = Builder.CreateIntCast(CI->getArgOperand(1),
  408     ReplaceCallWith("memset", CI, Ops, Ops+3, CI->getArgOperand(0)->getType());
  408     ReplaceCallWith("memset", CI, Ops, Ops+3, CI->getArgOperand(0)->getType());
  412     ReplaceFPIntrinsicWithCall(CI, "sqrtf", "sqrt", "sqrtl");
  416     ReplaceFPIntrinsicWithCall(CI, "logf", "log", "logl");
  420     ReplaceFPIntrinsicWithCall(CI, "log2f", "log2", "log2l");
  424     ReplaceFPIntrinsicWithCall(CI, "log10f", "log10", "log10l");
  428     ReplaceFPIntrinsicWithCall(CI, "expf", "exp", "expl");
  432     ReplaceFPIntrinsicWithCall(CI, "exp2f", "exp2", "exp2l");
  436     ReplaceFPIntrinsicWithCall(CI, "powf", "pow", "powl");
  440     ReplaceFPIntrinsicWithCall(CI, "sinf", "sin", "sinl");
  444     ReplaceFPIntrinsicWithCall(CI, "cosf", "cos", "cosl");
  448     ReplaceFPIntrinsicWithCall(CI, "floorf", "floor", "floorl");
  452     ReplaceFPIntrinsicWithCall(CI, "ceilf", "ceil", "ceill");
  456     ReplaceFPIntrinsicWithCall(CI, "truncf", "trunc", "truncl");
  460     ReplaceFPIntrinsicWithCall(CI, "roundf", "round", "roundl");
  464     ReplaceFPIntrinsicWithCall(CI, "copysignf", "copysign", "copysignl");
  469      if (!CI->getType()->isVoidTy())
  470        CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1));
  470        CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1));
  475     CI->replaceAllUsesWith(UndefValue::get(CI->getType()));
  475     CI->replaceAllUsesWith(UndefValue::get(CI->getType()));
  483   assert(CI->use_empty() &&
  485   CI->eraseFromParent();