Home | History | Annotate | Download | only in Utils

Lines Matching defs:StrLen

59   case LibFunc::strlen:
217 // memory is to be moved to. We just generate a call to strlen.
305 if (CharC->isZero()) // strchr(p, 0) -> p + strlen(p)
311 // zero (a weird way to spell strlen).
477 if (Dst == Src) { // stpcpy(x,x) -> x+strlen(x)
478 Value *StrLen = EmitStrLen(Src, B, DL, TLI);
479 return StrLen ? B.CreateInBoundsGEP(B.getInt8Ty(), Dst, StrLen) : nullptr;
550 // Constant folding: strlen("xyz") -> 3
554 // strlen(x?"foo":"bars") --> x ? 3 : 4
562 "folded strlen(select) to select of constants");
569 // strlen(x) != 0 --> *x != 0
570 // strlen(x) == 0 --> *x == 0
680 // strcspn(s, "") -> strlen(s)
699 // fold strstr(a, b) == a -> strncmp(a, b, strlen(b)) == 0
701 Value *StrLen = EmitStrLen(CI->getArgOperand(1), B, DL, TLI);
702 if (!StrLen)
705 StrLen, B, DL, TLI);
1652 // sprintf(str, fmt) -> llvm.memcpy(str, fmt, strlen(fmt)+1, 1)
1681 // sprintf(dest, "%s", str) -> llvm.memcpy(dest, str, strlen(str)+1, 1)
1847 // fputs(s,F) --> fwrite(s,1,strlen(s),F)
1923 case LibFunc::strlen:
2276 // __stpcpy_chk(x,x,...) -> x+strlen(x)
2278 Value *StrLen = EmitStrLen(Src, B, DL, TLI);
2279 StrLen ? B.CreateInBoundsGEP(B.getInt8Ty(), Dst, StrLen) : nullptr;