[clang] [CIR] Recognize strlen in the IdiomRecognizer pass (PR #210400)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 17 11:48:30 PDT 2026


================
@@ -103,7 +151,10 @@ struct IdiomRecognizerPass
 
 void IdiomRecognizerPass::recognizeStandardLibraryCall(
     CallOp call, mlir::SymbolTableCollection &symbolTables) {
-  StdRecognizer<StdFindOp>::raise(call, getContext(), symbolTables);
+  if (StdRecognizer<StdFindOp>::raise(call, getContext(), symbolTables))
----------------
erichkeane wrote:

So I suspect we are going to have a lot of these.  I suspect we actually want our `StdRecognizer` to take a LIST of ops and use a fold to do the recognition.

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


More information about the cfe-commits mailing list