• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/CodeGen/

Lines Matching refs:CI

392     bool optimizeCallInst(CallInst *CI, bool &ModifiedDT);
1125 static bool SinkCast(CastInst *CI) {
1126 BasicBlock *DefBB = CI->getParent();
1132 for (Value::user_iterator UI = CI->user_begin(), E = CI->user_end();
1167 InsertedCast = CastInst::Create(CI->getOpcode(), CI->getOperand(0),
1168 CI->getType(), "", &*InsertPt);
1169 InsertedCast->setDebugLoc(CI->getDebugLoc());
1179 if (CI->use_empty()) {
1180 salvageDebugInfo(*CI);
1181 CI->eraseFromParent();
1193 static bool OptimizeNoopCopyExpression(CastInst *CI, const TargetLowering &TLI,
1197 if (auto *ASC = dyn_cast<AddrSpaceCastInst>(CI)) {
1204 EVT SrcVT = TLI.getValueType(DL, CI->getOperand(0)->getType());
1205 EVT DstVT = TLI.getValueType(DL, CI->getType());
1218 if (TLI.getTypeAction(CI->getContext(), SrcVT) ==
1220 SrcVT = TLI.getTypeToTransformTo(CI->getContext(), SrcVT);
1221 if (TLI.getTypeAction(CI->getContext(), DstVT) ==
1223 DstVT = TLI.getTypeToTransformTo(CI->getContext(), DstVT);
1229 return SinkCast(CI);
1678 SinkShiftAndTruncate(BinaryOperator *ShiftI, Instruction *User, ConstantInt *CI,
1726 InsertedShift = BinaryOperator::CreateAShr(ShiftI->getOperand(0), CI,
1729 InsertedShift = BinaryOperator::CreateLShr(ShiftI->getOperand(0), CI,
1767 static bool OptimizeExtractBits(BinaryOperator *ShiftI, ConstantInt *CI,
1815 SinkShiftAndTruncate(ShiftI, User, CI, InsertedShifts, TLI, DL);
1827 InsertedShift = BinaryOperator::CreateAShr(ShiftI->getOperand(0), CI,
1830 InsertedShift = BinaryOperator::CreateLShr(ShiftI->getOperand(0), CI,
1927 bool CodeGenPrepare::optimizeCallInst(CallInst *CI, bool &ModifiedDT) {
1928 BasicBlock *BB = CI->getParent();
1933 if (CI->isInlineAsm()) {
1934 if (TLI->ExpandInlineAsm(CI)) {
1943 if (optimizeInlineAsmInst(CI))
1950 if (TLI->shouldAlignPointerArgs(CI, MinSize, PrefAlign)) {
1951 for (auto &Arg : CI->arg_operands()) {
1982 if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(CI)) {
2000 if (CI->hasFnAttr(Attribute::Cold) &&
2002 for (auto &Arg : CI->arg_operands()) {
2006 return optimizeMemoryInst(CI, Arg, Arg->getType(), AS);
2009 IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI);
2028 replaceAndRecursivelySimplify(CI, RetVal, TLInfo, nullptr);
2038 ZExtInst *ExtVal = dyn_cast<ZExtInst>(CI->getArgOperand(0));
2040 ExtVal->getParent() == CI->getParent())
2043 ExtVal->moveBefore(CI);
2111 if (!CI->getCalledFunction()) return false;
2118 IRBuilder<> Builder(CI);
2119 if (Value *V = Simplifier.optimizeCall(CI, Builder)) {
2120 CI->replaceAllUsesWith(V);
2121 CI->eraseFromParent();
2213 CallInst *CI = dyn_cast<CallInst>(IncomingVal);
2216 if (CI && CI->hasOneUse() && CI->getParent() == PredBB &&
2217 TLI->mayBeEmittedAsTailCall(CI) &&
2218 attributesPermitTailCall(F, CI, RetI, *TLI))
2234 CallInst *CI = dyn_cast<CallInst>(&*RI);
2235 if (CI && CI->use_empty() && TLI->mayBeEmittedAsTailCall(CI) &&
2236 attributesPermitTailCall(F, CI, RetI, *TLI))
3730 ConstantInt *CI = nullptr; Value *AddLHS = nullptr;
3732 match(ScaleReg, m_Add(m_Value(AddLHS), m_ConstantInt(CI))) &&
3733 CI->getValue().isSignedIntN(64)) {
3736 TestAddrMode.BaseOffs += CI->getSExtValue() * TestAddrMode.Scale;
4365 if (ConstantInt *CI =
4367 const APInt &CVal = CI->getValue();
4534 if (ConstantInt *CI = dyn_cast<ConstantInt>(Addr)) {
4535 if (CI->getValue().isSignedIntN(64)) {
4537 AddrMode.BaseOffs += CI->getSExtValue();
4540 AddrMode.BaseOffs -= CI->getSExtValue();
4612 static bool IsOperandAMemoryOperand(CallInst *CI, InlineAsm *IA, Value *OpVal,
4615 const Function *F = CI->getFunction();
4617 TLI.ParseConstraints(F->getParent()->getDataLayout(), &TRI, *CI);
4694 if (CallInst *CI = dyn_cast<CallInst>(UserI)) {
4695 if (CI->hasFnAttr(Attribute::Cold)) {
4699 llvm::shouldOptimizeForSize(CI->getParent(), PSI, BFI);
4704 InlineAsm *IA = dyn_cast<InlineAsm>(CI->getCalledOperand());
4708 if (!IsOperandAMemoryOperand(CI, IA, I, TLI, TRI))
5308 auto *CI = dyn_cast_or_null<ConstantInt>(C);
5309 if (!CI || !CI->isZero())
5312 Ops[i] = CI;
7460 if (CastInst *CI = dyn_cast<CastInst>(I)) {
7467 if (isa<Constant>(CI->getOperand(0)))
7470 if (OptimizeNoopCopyExpression(CI, *TLI, *DL))
7476 if (TLI->getTypeAction(CI->getContext(),
7477 TLI->getValueType(*DL, CI->getType())) ==
7479 return SinkCast(CI);
7529 ConstantInt *CI = dyn_cast<ConstantInt>(BinOp->getOperand(1));
7530 if (CI && TLI->hasExtractBitsInsn())
7531 if (OptimizeExtractBits(BinOp, CI, *TLI, *DL))