Lines Matching refs:getArgOperand
174 unsigned AS = CI->getArgOperand(ArgNo)->getType()->getPointerAddressSpace(); in annotateDereferenceableBytes()
202 unsigned AS = CI->getArgOperand(ArgNo)->getType()->getPointerAddressSpace(); in annotateNonNullBasedOnAccess()
233 Value *Dst = CI->getArgOperand(0); in optimizeStrCat()
234 Value *Src = CI->getArgOperand(1); in optimizeStrCat()
275 Value *Dst = CI->getArgOperand(0); in optimizeStrNCat()
276 Value *Src = CI->getArgOperand(1); in optimizeStrNCat()
277 Value *Size = CI->getArgOperand(2); in optimizeStrNCat()
319 Value *SrcStr = CI->getArgOperand(0); in optimizeStrChr()
324 ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in optimizeStrChr()
334 return emitMemChr(SrcStr, CI->getArgOperand(1), // include nul. in optimizeStrChr()
362 Value *SrcStr = CI->getArgOperand(0); in optimizeStrRChr()
363 ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in optimizeStrRChr()
390 Value *Str1P = CI->getArgOperand(0), *Str2P = CI->getArgOperand(1); in optimizeStrCmp()
445 Value *Str1P = CI->getArgOperand(0); in optimizeStrNCmp()
446 Value *Str2P = CI->getArgOperand(1); in optimizeStrNCmp()
447 Value *Size = CI->getArgOperand(2); in optimizeStrNCmp()
513 Value *Src = CI->getArgOperand(0); in optimizeStrNDup()
514 ConstantInt *Size = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in optimizeStrNDup()
526 Value *Dst = CI->getArgOperand(0), *Src = CI->getArgOperand(1); in optimizeStrCpy()
549 Value *Dst = CI->getArgOperand(0), *Src = CI->getArgOperand(1); in optimizeStpCpy()
576 Value *Dst = CI->getArgOperand(0); in optimizeStrNCpy()
577 Value *Src = CI->getArgOperand(1); in optimizeStrNCpy()
578 Value *Size = CI->getArgOperand(2); in optimizeStrNCpy()
635 Value *Src = CI->getArgOperand(0); in optimizeStringLength()
741 bool HasS1 = getConstantStringInfo(CI->getArgOperand(0), S1); in optimizeStrPBrk()
742 bool HasS2 = getConstantStringInfo(CI->getArgOperand(1), S2); in optimizeStrPBrk()
755 return B.CreateGEP(B.getInt8Ty(), CI->getArgOperand(0), B.getInt64(I), in optimizeStrPBrk()
761 return emitStrChr(CI->getArgOperand(0), S2[0], B, TLI); in optimizeStrPBrk()
767 Value *EndPtr = CI->getArgOperand(1); in optimizeStrTo()
779 bool HasS1 = getConstantStringInfo(CI->getArgOperand(0), S1); in optimizeStrSpn()
780 bool HasS2 = getConstantStringInfo(CI->getArgOperand(1), S2); in optimizeStrSpn()
800 bool HasS1 = getConstantStringInfo(CI->getArgOperand(0), S1); in optimizeStrCSpn()
801 bool HasS2 = getConstantStringInfo(CI->getArgOperand(1), S2); in optimizeStrCSpn()
817 return emitStrLen(CI->getArgOperand(0), B, DL, TLI); in optimizeStrCSpn()
824 if (CI->getArgOperand(0) == CI->getArgOperand(1)) in optimizeStrStr()
825 return B.CreateBitCast(CI->getArgOperand(0), CI->getType()); in optimizeStrStr()
828 if (isOnlyUsedInEqualityComparison(CI, CI->getArgOperand(0))) { in optimizeStrStr()
829 Value *StrLen = emitStrLen(CI->getArgOperand(1), B, DL, TLI); in optimizeStrStr()
832 Value *StrNCmp = emitStrNCmp(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeStrStr()
848 bool HasStr1 = getConstantStringInfo(CI->getArgOperand(0), SearchStr); in optimizeStrStr()
849 bool HasStr2 = getConstantStringInfo(CI->getArgOperand(1), ToFindStr); in optimizeStrStr()
853 return B.CreateBitCast(CI->getArgOperand(0), CI->getType()); in optimizeStrStr()
863 Value *Result = castToCStr(CI->getArgOperand(0), B); in optimizeStrStr()
871 Value *StrChr = emitStrChr(CI->getArgOperand(0), ToFindStr[0], B, TLI); in optimizeStrStr()
886 Value *SrcStr = CI->getArgOperand(0); in optimizeMemChr()
887 Value *Size = CI->getArgOperand(2); in optimizeMemChr()
889 ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in optimizeMemChr()
944 Value *C = B.CreateZExtOrTrunc(CI->getArgOperand(1), BitfieldC->getType()); in optimizeMemChr()
1052 Value *LHS = CI->getArgOperand(0), *RHS = CI->getArgOperand(1); in optimizeMemCmpBCmpCommon()
1053 Value *Size = CI->getArgOperand(2); in optimizeMemCmpBCmpCommon()
1082 Value *LHS = CI->getArgOperand(0); in optimizeMemCmp()
1083 Value *RHS = CI->getArgOperand(1); in optimizeMemCmp()
1084 Value *Size = CI->getArgOperand(2); in optimizeMemCmp()
1096 Value *Size = CI->getArgOperand(2); in optimizeMemCpy()
1102 CallInst *NewCI = B.CreateMemCpy(CI->getArgOperand(0), Align(1), in optimizeMemCpy()
1103 CI->getArgOperand(1), Align(1), Size); in optimizeMemCpy()
1105 return CI->getArgOperand(0); in optimizeMemCpy()
1109 Value *Dst = CI->getArgOperand(0); in optimizeMemCCpy()
1110 Value *Src = CI->getArgOperand(1); in optimizeMemCCpy()
1111 ConstantInt *StopChar = dyn_cast<ConstantInt>(CI->getArgOperand(2)); in optimizeMemCCpy()
1112 ConstantInt *N = dyn_cast<ConstantInt>(CI->getArgOperand(3)); in optimizeMemCCpy()
1132 B.CreateMemCpy(Dst, Align(1), Src, Align(1), CI->getArgOperand(3)); in optimizeMemCCpy()
1148 Value *Dst = CI->getArgOperand(0); in optimizeMemPCpy()
1149 Value *N = CI->getArgOperand(2); in optimizeMemPCpy()
1152 B.CreateMemCpy(Dst, Align(1), CI->getArgOperand(1), Align(1), N); in optimizeMemPCpy()
1158 Value *Size = CI->getArgOperand(2); in optimizeMemMove()
1164 CallInst *NewCI = B.CreateMemMove(CI->getArgOperand(0), Align(1), in optimizeMemMove()
1165 CI->getArgOperand(1), Align(1), Size); in optimizeMemMove()
1167 return CI->getArgOperand(0); in optimizeMemMove()
1173 auto *FillValue = dyn_cast<ConstantInt>(Memset->getArgOperand(1)); in foldMallocMemset()
1181 auto *Malloc = dyn_cast<CallInst>(Memset->getArgOperand(0)); in foldMallocMemset()
1196 if (Memset->getArgOperand(2) != Malloc->getArgOperand(0)) in foldMallocMemset()
1205 Malloc->getArgOperand(0), in foldMallocMemset()
1215 Value *Size = CI->getArgOperand(2); in optimizeMemSet()
1224 Value *Val = B.CreateIntCast(CI->getArgOperand(1), B.getInt8Ty(), false); in optimizeMemSet()
1225 CallInst *NewCI = B.CreateMemSet(CI->getArgOperand(0), Val, Size, Align(1)); in optimizeMemSet()
1227 return CI->getArgOperand(0); in optimizeMemSet()
1231 if (isa<ConstantPointerNull>(CI->getArgOperand(0))) in optimizeRealloc()
1232 return emitMalloc(CI->getArgOperand(1), B, DL, TLI); in optimizeRealloc()
1249 Value *V = CI->getArgOperand(0); in replaceUnaryCall()
1297 V[0] = valueHasFloatPrecision(CI->getArgOperand(0)); in optimizeDoubleFP()
1298 V[1] = isBinary ? valueHasFloatPrecision(CI->getArgOperand(1)) : nullptr; in optimizeDoubleFP()
1359 Value *Op = CI->getArgOperand(0); in optimizeCAbs()
1365 Real = CI->getArgOperand(0); in optimizeCAbs()
1366 Imag = CI->getArgOperand(1); in optimizeCAbs()
1396 if (match(Call->getArgOperand(0), m_OneUse(m_FNeg(m_Value(X))))) in optimizeTrigReflections()
1403 if (match(Call->getArgOperand(0), m_FNeg(m_Value(X)))) in optimizeTrigReflections()
1457 Value *Base = Pow->getArgOperand(0), *Expo = Pow->getArgOperand(1); in replacePowWithExp()
1510 Value *FMul = B.CreateFMul(BaseFn->getArgOperand(0), Expo, "mul"); in replacePowWithExp()
1530 if (!match(Pow->getArgOperand(0), m_APFloat(BaseF))) in replacePowWithExp()
1624 Value *Sqrt, *Base = Pow->getArgOperand(0), *Expo = Pow->getArgOperand(1); in replacePowWithSqrt()
1681 Value *Base = Pow->getArgOperand(0); in optimizePow()
1682 Value *Expo = Pow->getArgOperand(1); in optimizePow()
1814 Value *Op = CI->getArgOperand(0); in optimizeExp2()
1853 return B.CreateCall(F, { CI->getArgOperand(0), CI->getArgOperand(1) }); in optimizeFMinFMax()
1869 CallInst *Arg = dyn_cast<CallInst>(Log->getArgOperand(0)); in optimizeLog()
1975 Value *MulY = B.CreateFMul(Arg->getArgOperand(1), LogX, "mul"); in optimizeLog()
1998 Value *MulY = B.CreateFMul(Arg->getArgOperand(0), LogE, "mul"); in optimizeLog()
2021 Instruction *I = dyn_cast<Instruction>(CI->getArgOperand(0)); in optimizeSqrt()
2084 Value *Op1 = CI->getArgOperand(0); in optimizeTan()
2102 Ret = OpC->getArgOperand(0); in optimizeTan()
2170 Value *Arg = CI->getArgOperand(0); in optimizeSinCosPi()
2247 Value *Op = CI->getArgOperand(0); in optimizeFFS()
2261 Value *Op = CI->getArgOperand(0); in optimizeFls()
2274 Value *X = CI->getArgOperand(0); in optimizeAbs()
2282 Value *Op = CI->getArgOperand(0); in optimizeIsDigit()
2290 Value *Op = CI->getArgOperand(0); in optimizeIsAscii()
2297 return B.CreateAnd(CI->getArgOperand(0), in optimizeToAscii()
2303 if (!getConstantStringInfo(CI->getArgOperand(0), Str)) in optimizeAtoi()
2311 if (!getConstantStringInfo(CI->getArgOperand(0), Str)) in optimizeStrtol()
2314 if (!isa<ConstantPointerNull>(CI->getArgOperand(1))) in optimizeStrtol()
2317 if (ConstantInt *CInt = dyn_cast<ConstantInt>(CI->getArgOperand(2))) { in optimizeStrtol()
2361 LoadInst *LI = dyn_cast<LoadInst>(CI->getArgOperand(StreamArg)); in isReportingError()
2373 if (!getConstantStringInfo(CI->getArgOperand(0), FormatStr)) in optimizePrintFString()
2413 CI->getArgOperand(1)->getType()->isIntegerTy()) in optimizePrintFString()
2414 return emitPutChar(CI->getArgOperand(1), B, TLI); in optimizePrintFString()
2418 CI->getArgOperand(1)->getType()->isPointerTy()) in optimizePrintFString()
2419 return emitPutS(CI->getArgOperand(1), B, TLI); in optimizePrintFString()
2464 if (!getConstantStringInfo(CI->getArgOperand(1), FormatStr)) in optimizeSPrintFString()
2476 CI->getArgOperand(0), Align(1), CI->getArgOperand(1), Align(1), in optimizeSPrintFString()
2491 if (!CI->getArgOperand(2)->getType()->isIntegerTy()) in optimizeSPrintFString()
2493 Value *V = B.CreateTrunc(CI->getArgOperand(2), B.getInt8Ty(), "char"); in optimizeSPrintFString()
2494 Value *Ptr = castToCStr(CI->getArgOperand(0), B); in optimizeSPrintFString()
2505 if (!CI->getArgOperand(2)->getType()->isPointerTy()) in optimizeSPrintFString()
2510 return emitStrCpy(CI->getArgOperand(0), CI->getArgOperand(2), B, TLI); in optimizeSPrintFString()
2512 uint64_t SrcLen = GetStringLength(CI->getArgOperand(2)); in optimizeSPrintFString()
2515 CI->getArgOperand(0), Align(1), CI->getArgOperand(2), Align(1), in optimizeSPrintFString()
2519 } else if (Value *V = emitStpCpy(CI->getArgOperand(0), CI->getArgOperand(2), in optimizeSPrintFString()
2522 Value *PtrDiff = B.CreatePtrDiff(V, CI->getArgOperand(0)); in optimizeSPrintFString()
2532 Value *Len = emitStrLen(CI->getArgOperand(2), B, DL, TLI); in optimizeSPrintFString()
2537 B.CreateMemCpy(CI->getArgOperand(0), Align(1), CI->getArgOperand(2), in optimizeSPrintFString()
2585 ConstantInt *Size = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in optimizeSnPrintFString()
2592 if (!getConstantStringInfo(CI->getArgOperand(2), FormatStr)) in optimizeSnPrintFString()
2610 CI->getArgOperand(0), Align(1), CI->getArgOperand(2), Align(1), in optimizeSnPrintFString()
2629 if (!CI->getArgOperand(3)->getType()->isIntegerTy()) in optimizeSnPrintFString()
2631 Value *V = B.CreateTrunc(CI->getArgOperand(3), B.getInt8Ty(), "char"); in optimizeSnPrintFString()
2632 Value *Ptr = castToCStr(CI->getArgOperand(0), B); in optimizeSnPrintFString()
2643 if (!getConstantStringInfo(CI->getArgOperand(3), Str)) in optimizeSnPrintFString()
2651 B.CreateMemCpy(CI->getArgOperand(0), Align(1), CI->getArgOperand(3), in optimizeSnPrintFString()
2677 if (!getConstantStringInfo(CI->getArgOperand(1), FormatStr)) in optimizeFPrintFString()
2693 CI->getArgOperand(1), in optimizeFPrintFString()
2695 CI->getArgOperand(0), B, DL, TLI); in optimizeFPrintFString()
2707 if (!CI->getArgOperand(2)->getType()->isIntegerTy()) in optimizeFPrintFString()
2709 return emitFPutC(CI->getArgOperand(2), CI->getArgOperand(0), B, TLI); in optimizeFPrintFString()
2714 if (!CI->getArgOperand(2)->getType()->isPointerTy()) in optimizeFPrintFString()
2716 return emitFPutS(CI->getArgOperand(2), CI->getArgOperand(0), B, TLI); in optimizeFPrintFString()
2760 ConstantInt *SizeC = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in optimizeFWrite()
2761 ConstantInt *CountC = dyn_cast<ConstantInt>(CI->getArgOperand(2)); in optimizeFWrite()
2773 castToCStr(CI->getArgOperand(0), B), "char"); in optimizeFWrite()
2774 Value *NewCI = emitFPutC(Char, CI->getArgOperand(3), B, TLI); in optimizeFWrite()
2798 uint64_t Len = GetStringLength(CI->getArgOperand(0)); in optimizeFPuts()
2804 CI->getArgOperand(0), in optimizeFPuts()
2806 CI->getArgOperand(1), B, DL, TLI); in optimizeFPuts()
2817 if (getConstantStringInfo(CI->getArgOperand(0), Str) && Str.empty()) in optimizePuts()
2825 return B.CreateMemMove(CI->getArgOperand(1), Align(1), CI->getArgOperand(0), in optimizeBCopy()
2826 Align(1), CI->getArgOperand(2)); in optimizeBCopy()
3222 ConstantInt *Flag = dyn_cast<ConstantInt>(CI->getArgOperand(*FlagOp)); in isFortifiedCallFoldable()
3227 if (SizeOp && CI->getArgOperand(ObjSizeOp) == CI->getArgOperand(*SizeOp)) in isFortifiedCallFoldable()
3231 dyn_cast<ConstantInt>(CI->getArgOperand(ObjSizeOp))) { in isFortifiedCallFoldable()
3238 uint64_t Len = GetStringLength(CI->getArgOperand(*StrOp)); in isFortifiedCallFoldable()
3250 dyn_cast<ConstantInt>(CI->getArgOperand(*SizeOp))) in isFortifiedCallFoldable()
3261 B.CreateMemCpy(CI->getArgOperand(0), Align(1), CI->getArgOperand(1), in optimizeMemCpyChk()
3262 Align(1), CI->getArgOperand(2)); in optimizeMemCpyChk()
3264 return CI->getArgOperand(0); in optimizeMemCpyChk()
3273 B.CreateMemMove(CI->getArgOperand(0), Align(1), CI->getArgOperand(1), in optimizeMemMoveChk()
3274 Align(1), CI->getArgOperand(2)); in optimizeMemMoveChk()
3276 return CI->getArgOperand(0); in optimizeMemMoveChk()
3286 Value *Val = B.CreateIntCast(CI->getArgOperand(1), B.getInt8Ty(), false); in optimizeMemSetChk()
3287 CallInst *NewCI = B.CreateMemSet(CI->getArgOperand(0), Val, in optimizeMemSetChk()
3288 CI->getArgOperand(2), Align(1)); in optimizeMemSetChk()
3290 return CI->getArgOperand(0); in optimizeMemSetChk()
3299 if (Value *Call = emitMemPCpy(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeMemPCpyChk()
3300 CI->getArgOperand(2), B, DL, TLI)) { in optimizeMemPCpyChk()
3312 Value *Dst = CI->getArgOperand(0), *Src = CI->getArgOperand(1), in optimizeStrpCpyChk()
3313 *ObjSize = CI->getArgOperand(2); in optimizeStrpCpyChk()
3356 return emitStrLen(CI->getArgOperand(0), B, CI->getModule()->getDataLayout(), in optimizeStrLenChk()
3366 return emitStrNCpy(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeStrpNCpyChk()
3367 CI->getArgOperand(2), B, TLI); in optimizeStrpNCpyChk()
3369 return emitStpNCpy(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeStrpNCpyChk()
3370 CI->getArgOperand(2), B, TLI); in optimizeStrpNCpyChk()
3379 return emitMemCCpy(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeMemCCpyChk()
3380 CI->getArgOperand(2), CI->getArgOperand(3), B, TLI); in optimizeMemCCpyChk()
3389 return emitSNPrintf(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeSNPrintfChk()
3390 CI->getArgOperand(4), VariadicArgs, B, TLI); in optimizeSNPrintfChk()
3400 return emitSPrintf(CI->getArgOperand(0), CI->getArgOperand(3), VariadicArgs, in optimizeSPrintfChk()
3410 return emitStrCat(CI->getArgOperand(0), CI->getArgOperand(1), B, TLI); in optimizeStrCatChk()
3418 return emitStrLCat(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeStrLCat()
3419 CI->getArgOperand(2), B, TLI); in optimizeStrLCat()
3427 return emitStrNCat(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeStrNCatChk()
3428 CI->getArgOperand(2), B, TLI); in optimizeStrNCatChk()
3436 return emitStrLCpy(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeStrLCpyChk()
3437 CI->getArgOperand(2), B, TLI); in optimizeStrLCpyChk()
3445 return emitVSNPrintf(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeVSNPrintfChk()
3446 CI->getArgOperand(4), CI->getArgOperand(5), B, TLI); in optimizeVSNPrintfChk()
3454 return emitVSPrintf(CI->getArgOperand(0), CI->getArgOperand(3), in optimizeVSPrintfChk()
3455 CI->getArgOperand(4), B, TLI); in optimizeVSPrintfChk()