Lines Matching refs:LibFunc

55 static bool ignoreCallingConv(LibFunc::Func Func) {  in ignoreCallingConv()
56 return Func == LibFunc::abs || Func == LibFunc::labs || in ignoreCallingConv()
57 Func == LibFunc::llabs || Func == LibFunc::strlen; in ignoreCallingConv()
97 LibFunc::Func DoubleFn, LibFunc::Func FloatFn, in hasUnaryFloatFn()
98 LibFunc::Func LongDoubleFn) { in hasUnaryFloatFn()
130 static bool checkStringCopyLibFuncSignature(Function *F, LibFunc::Func Func) { in checkStringCopyLibFuncSignature()
145 case LibFunc::stpncpy_chk: in checkStringCopyLibFuncSignature()
146 case LibFunc::strncpy_chk: in checkStringCopyLibFuncSignature()
148 case LibFunc::stpncpy: in checkStringCopyLibFuncSignature()
149 case LibFunc::strncpy: { in checkStringCopyLibFuncSignature()
155 case LibFunc::strcpy_chk: in checkStringCopyLibFuncSignature()
156 case LibFunc::stpcpy_chk: in checkStringCopyLibFuncSignature()
158 case LibFunc::stpcpy: in checkStringCopyLibFuncSignature()
159 case LibFunc::strcpy: { in checkStringCopyLibFuncSignature()
165 case LibFunc::memmove_chk: in checkStringCopyLibFuncSignature()
166 case LibFunc::memcpy_chk: in checkStringCopyLibFuncSignature()
168 case LibFunc::memmove: in checkStringCopyLibFuncSignature()
169 case LibFunc::memcpy: { in checkStringCopyLibFuncSignature()
175 case LibFunc::memset_chk: in checkStringCopyLibFuncSignature()
177 case LibFunc::memset: { in checkStringCopyLibFuncSignature()
456 if (!checkStringCopyLibFuncSignature(Callee, LibFunc::strcpy)) in optimizeStrCpy()
477 if (!checkStringCopyLibFuncSignature(Callee, LibFunc::stpcpy)) in optimizeStpCpy()
504 if (!checkStringCopyLibFuncSignature(Callee, LibFunc::strncpy)) in optimizeStrNCpy()
912 if (!checkStringCopyLibFuncSignature(Callee, LibFunc::memcpy)) in optimizeMemCpy()
924 if (!checkStringCopyLibFuncSignature(Callee, LibFunc::memmove)) in optimizeMemMove()
936 if (!checkStringCopyLibFuncSignature(Callee, LibFunc::memset)) in optimizeMemSet()
1108 hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp2, LibFunc::exp2f, in optimizePow()
1109 LibFunc::exp2l)) in optimizePow()
1110 return EmitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp2), B, in optimizePow()
1114 hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp10, LibFunc::exp10f, in optimizePow()
1115 LibFunc::exp10l)) in optimizePow()
1116 return EmitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp10), B, in optimizePow()
1136 LibFunc::Func Func; in optimizePow()
1139 TLI->has(Func) && (Func == LibFunc::exp || Func == LibFunc::exp2)) in optimizePow()
1154 hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::sqrt, LibFunc::sqrtf, in optimizePow()
1155 LibFunc::sqrtl) && in optimizePow()
1156 hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::fabs, LibFunc::fabsf, in optimizePow()
1157 LibFunc::fabsl)) { in optimizePow()
1161 return EmitUnaryFloatFnCall(Op1, TLI->getName(LibFunc::sqrt), B, in optimizePow()
1231 LibFunc::Func LdExp = LibFunc::ldexpl; in optimizeExp2()
1233 LdExp = LibFunc::ldexpf; in optimizeExp2()
1235 LdExp = LibFunc::ldexp; in optimizeExp2()
1369 LibFunc::Func Func; in optimizeLog()
1372 Func == LibFunc::pow) || F->getIntrinsicID() == Intrinsic::pow)) in optimizeLog()
1379 TLI->has(Func) && Func == LibFunc::exp2) in optimizeLog()
1392 if (TLI->has(LibFunc::sqrtf) && (Callee->getName() == "sqrt" || in optimizeSqrt()
1479 LibFunc::Func Func; in optimizeTan()
1482 ((Func == LibFunc::atan && Callee->getName() == "tan") || in optimizeTan()
1483 (Func == LibFunc::atanf && Callee->getName() == "tanf") || in optimizeTan()
1484 (Func == LibFunc::atanl && Callee->getName() == "tanl"))) in optimizeTan()
1556 LibFunc::Func Func; in classifyArgUse()
1562 if (Func == LibFunc::sinpif) in classifyArgUse()
1564 else if (Func == LibFunc::cospif) in classifyArgUse()
1566 else if (Func == LibFunc::sincospif_stret) in classifyArgUse()
1569 if (Func == LibFunc::sinpi) in classifyArgUse()
1571 else if (Func == LibFunc::cospi) in classifyArgUse()
1573 else if (Func == LibFunc::sincospi_stret) in classifyArgUse()
1833 if (TLI->has(LibFunc::iprintf) && !callHasFloatingPointArgument(CI)) { in optimizePrintF()
1920 if (TLI->has(LibFunc::siprintf) && !callHasFloatingPointArgument(CI)) { in optimizeSPrintF()
1996 if (TLI->has(LibFunc::fiprintf) && !callHasFloatingPointArgument(CI)) { in optimizeFPrintF()
2091 LibFunc::Func Func; in hasFloatVersion()
2101 LibFunc::Func Func; in optimizeStringMemoryLibCall()
2112 case LibFunc::strcat: in optimizeStringMemoryLibCall()
2114 case LibFunc::strncat: in optimizeStringMemoryLibCall()
2116 case LibFunc::strchr: in optimizeStringMemoryLibCall()
2118 case LibFunc::strrchr: in optimizeStringMemoryLibCall()
2120 case LibFunc::strcmp: in optimizeStringMemoryLibCall()
2122 case LibFunc::strncmp: in optimizeStringMemoryLibCall()
2124 case LibFunc::strcpy: in optimizeStringMemoryLibCall()
2126 case LibFunc::stpcpy: in optimizeStringMemoryLibCall()
2128 case LibFunc::strncpy: in optimizeStringMemoryLibCall()
2130 case LibFunc::strlen: in optimizeStringMemoryLibCall()
2132 case LibFunc::strpbrk: in optimizeStringMemoryLibCall()
2134 case LibFunc::strtol: in optimizeStringMemoryLibCall()
2135 case LibFunc::strtod: in optimizeStringMemoryLibCall()
2136 case LibFunc::strtof: in optimizeStringMemoryLibCall()
2137 case LibFunc::strtoul: in optimizeStringMemoryLibCall()
2138 case LibFunc::strtoll: in optimizeStringMemoryLibCall()
2139 case LibFunc::strtold: in optimizeStringMemoryLibCall()
2140 case LibFunc::strtoull: in optimizeStringMemoryLibCall()
2142 case LibFunc::strspn: in optimizeStringMemoryLibCall()
2144 case LibFunc::strcspn: in optimizeStringMemoryLibCall()
2146 case LibFunc::strstr: in optimizeStringMemoryLibCall()
2148 case LibFunc::memchr: in optimizeStringMemoryLibCall()
2150 case LibFunc::memcmp: in optimizeStringMemoryLibCall()
2152 case LibFunc::memcpy: in optimizeStringMemoryLibCall()
2154 case LibFunc::memmove: in optimizeStringMemoryLibCall()
2156 case LibFunc::memset: in optimizeStringMemoryLibCall()
2169 LibFunc::Func Func; in optimizeCall()
2227 case LibFunc::cosf: in optimizeCall()
2228 case LibFunc::cos: in optimizeCall()
2229 case LibFunc::cosl: in optimizeCall()
2231 case LibFunc::sinpif: in optimizeCall()
2232 case LibFunc::sinpi: in optimizeCall()
2233 case LibFunc::cospif: in optimizeCall()
2234 case LibFunc::cospi: in optimizeCall()
2236 case LibFunc::powf: in optimizeCall()
2237 case LibFunc::pow: in optimizeCall()
2238 case LibFunc::powl: in optimizeCall()
2240 case LibFunc::exp2l: in optimizeCall()
2241 case LibFunc::exp2: in optimizeCall()
2242 case LibFunc::exp2f: in optimizeCall()
2244 case LibFunc::fabsf: in optimizeCall()
2245 case LibFunc::fabs: in optimizeCall()
2246 case LibFunc::fabsl: in optimizeCall()
2248 case LibFunc::sqrtf: in optimizeCall()
2249 case LibFunc::sqrt: in optimizeCall()
2250 case LibFunc::sqrtl: in optimizeCall()
2252 case LibFunc::ffs: in optimizeCall()
2253 case LibFunc::ffsl: in optimizeCall()
2254 case LibFunc::ffsll: in optimizeCall()
2256 case LibFunc::abs: in optimizeCall()
2257 case LibFunc::labs: in optimizeCall()
2258 case LibFunc::llabs: in optimizeCall()
2260 case LibFunc::isdigit: in optimizeCall()
2262 case LibFunc::isascii: in optimizeCall()
2264 case LibFunc::toascii: in optimizeCall()
2266 case LibFunc::printf: in optimizeCall()
2268 case LibFunc::sprintf: in optimizeCall()
2270 case LibFunc::fprintf: in optimizeCall()
2272 case LibFunc::fwrite: in optimizeCall()
2274 case LibFunc::fputs: in optimizeCall()
2276 case LibFunc::log: in optimizeCall()
2277 case LibFunc::log10: in optimizeCall()
2278 case LibFunc::log1p: in optimizeCall()
2279 case LibFunc::log2: in optimizeCall()
2280 case LibFunc::logb: in optimizeCall()
2282 case LibFunc::puts: in optimizeCall()
2284 case LibFunc::tan: in optimizeCall()
2285 case LibFunc::tanf: in optimizeCall()
2286 case LibFunc::tanl: in optimizeCall()
2288 case LibFunc::perror: in optimizeCall()
2290 case LibFunc::vfprintf: in optimizeCall()
2291 case LibFunc::fiprintf: in optimizeCall()
2293 case LibFunc::fputc: in optimizeCall()
2295 case LibFunc::ceil: in optimizeCall()
2296 case LibFunc::floor: in optimizeCall()
2297 case LibFunc::rint: in optimizeCall()
2298 case LibFunc::round: in optimizeCall()
2299 case LibFunc::nearbyint: in optimizeCall()
2300 case LibFunc::trunc: in optimizeCall()
2304 case LibFunc::acos: in optimizeCall()
2305 case LibFunc::acosh: in optimizeCall()
2306 case LibFunc::asin: in optimizeCall()
2307 case LibFunc::asinh: in optimizeCall()
2308 case LibFunc::atan: in optimizeCall()
2309 case LibFunc::atanh: in optimizeCall()
2310 case LibFunc::cbrt: in optimizeCall()
2311 case LibFunc::cosh: in optimizeCall()
2312 case LibFunc::exp: in optimizeCall()
2313 case LibFunc::exp10: in optimizeCall()
2314 case LibFunc::expm1: in optimizeCall()
2315 case LibFunc::sin: in optimizeCall()
2316 case LibFunc::sinh: in optimizeCall()
2317 case LibFunc::tanh: in optimizeCall()
2321 case LibFunc::copysign: in optimizeCall()
2325 case LibFunc::fminf: in optimizeCall()
2326 case LibFunc::fmin: in optimizeCall()
2327 case LibFunc::fminl: in optimizeCall()
2328 case LibFunc::fmaxf: in optimizeCall()
2329 case LibFunc::fmax: in optimizeCall()
2330 case LibFunc::fmaxl: in optimizeCall()
2425 if (!checkStringCopyLibFuncSignature(Callee, LibFunc::memcpy_chk)) in optimizeMemCpyChk()
2439 if (!checkStringCopyLibFuncSignature(Callee, LibFunc::memmove_chk)) in optimizeMemMoveChk()
2453 if (!checkStringCopyLibFuncSignature(Callee, LibFunc::memset_chk)) in optimizeMemSetChk()
2466 LibFunc::Func Func) { in optimizeStrpCpyChk()
2478 if (Func == LibFunc::stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { in optimizeStrpCpyChk()
2504 if (Ret && Func == LibFunc::stpcpy_chk) in optimizeStrpCpyChk()
2511 LibFunc::Func Func) { in optimizeStrpNCpyChk()
2539 LibFunc::Func Func; in optimizeCall()
2554 case LibFunc::memcpy_chk: in optimizeCall()
2556 case LibFunc::memmove_chk: in optimizeCall()
2558 case LibFunc::memset_chk: in optimizeCall()
2560 case LibFunc::stpcpy_chk: in optimizeCall()
2561 case LibFunc::strcpy_chk: in optimizeCall()
2563 case LibFunc::stpncpy_chk: in optimizeCall()
2564 case LibFunc::strncpy_chk: in optimizeCall()