Reland "[Transforms] LoopIdiomRecognize recognize strlen and wcslen #108985" (#132572)
Reland https://github.com/llvm/llvm-project/pull/108985 Extend `LoopIdiomRecognize` to find and replace loops of the form ```c base = str; while (*str) ++str; ``` and transforming the `strlen` loop idiom into the appropriate `strlen` and `wcslen` library call which will give a small performance boost if replaced. ```c str = base + strlen(base) len = str - base ```
Loading
Please sign in to comment