[llvm] [Transforms] LoopIdiomRecognize recognize strlen and wcslen (PR #108985)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 16:07:47 PST 2025


================
@@ -97,6 +97,7 @@ using namespace llvm;
 STATISTIC(NumMemSet, "Number of memset's formed from loop stores");
 STATISTIC(NumMemCpy, "Number of memcpy's formed from loop load+stores");
 STATISTIC(NumMemMove, "Number of memmove's formed from loop load+stores");
+STATISTIC(NumStrLen, "Number of strlen's formed from loop loads");
----------------
Meinersbur wrote:

```suggestion
STATISTIC(NumStrLen, "Number of strlen's and wcslen's formed from loop loads");
```

https://github.com/llvm/llvm-project/pull/108985


More information about the llvm-commits mailing list