Home | History | Annotate | Download | only in Utils

Lines Matching defs:StrLen

313     if (Dst == Src) {  // stpcpy(x,x)  -> x+strlen(x)
314 Value *StrLen = EmitStrLen(Src, B, DL, TLI);
315 return StrLen ? B.CreateInBoundsGEP(Dst, StrLen) : nullptr;
410 // memory is to be moved to. We just generate a call to strlen.
506 if (DL && CharC->isZero()) // strchr(p, 0) -> p + strlen(p)
512 // zero (a weird way to spell strlen).
702 if (Dst == Src) { // stpcpy(x,x) -> x+strlen(x)
703 Value *StrLen = EmitStrLen(Src, B, DL, TLI);
704 return StrLen ? B.CreateInBoundsGEP(Dst, StrLen) : nullptr;
784 // Constant folding: strlen("xyz") -> 3
788 // strlen(x?"foo":"bars") --> x ? 3 : 4
795 "folded strlen(select) to select of constants");
802 // strlen(x) != 0 --> *x != 0
803 // strlen(x) == 0 --> *x == 0
922 // strcspn(s, "") -> strlen(s)
944 // fold strstr(a, b) == a -> strncmp(a, b, strlen(b)) == 0
946 Value *StrLen = EmitStrLen(CI->getArgOperand(1), B, DL, TLI);
947 if (!StrLen)
950 StrLen, B, DL, TLI);
1766 // sprintf(str, fmt) -> llvm.memcpy(str, fmt, strlen(fmt)+1, 1)
1796 // sprintf(dest, "%s", str) -> llvm.memcpy(dest, str, strlen(str)+1, 1)
1976 // fputs(s,F) --> fwrite(s,1,strlen(s),F)
2069 static StrLenOpt StrLen;
2144 case LibFunc::strlen:
2145 return &StrLen;