Home | History | Annotate | Download | only in Utils

Lines Matching full:strlen

57          Func == LibFunc::llabs || Func == LibFunc::strlen;
224 // memory is to be moved to. We just generate a call to strlen.
312 if (CharC->isZero()) // strchr(p, 0) -> p + strlen(p)
318 // zero (a weird way to spell strlen).
481 if (Dst == Src) { // stpcpy(x,x) -> x+strlen(x)
482 Value *StrLen = EmitStrLen(Src, B, DL, TLI);
483 return StrLen ? B.CreateInBoundsGEP(B.getInt8Ty(), Dst, StrLen) : nullptr;
552 // Constant folding: strlen("xyz") -> 3
556 // strlen(x?"foo":"bars") --> x ? 3 : 4
564 "folded strlen(select) to select of constants");
571 // strlen(x) != 0 --> *x != 0
572 // strlen(x) == 0 --> *x == 0
682 // strcspn(s, "") -> strlen(s)
701 // fold strstr(a, b) == a -> strncmp(a, b, strlen(b)) == 0
703 Value *StrLen = EmitStrLen(CI->getArgOperand(1), B, DL, TLI);
704 if (!StrLen)
707 StrLen, B, DL, TLI);
1859 // sprintf(str, fmt) -> llvm.memcpy(str, fmt, strlen(fmt)+1, 1)
1888 // sprintf(dest, "%s", str) -> llvm.memcpy(dest, str, strlen(str)+1, 1)
2054 // fputs(s,F) --> fwrite(s,1,strlen(s),F)
2130 case LibFunc::strlen:
2477 // __stpcpy_chk(x,x,...) -> x+strlen(x)
2479 Value *StrLen = EmitStrLen(Src, B, DL, TLI);
2480 return StrLen ? B.CreateInBoundsGEP(B.getInt8Ty(), Dst, StrLen) : nullptr;