[Mlir-commits] [mlir] [mlir][inliner] optimize self-recursive function detection [NFC] (PR #88452)

Mehdi Amini llvmlistbot at llvm.org
Fri Apr 12 02:00:38 PDT 2024


================
@@ -705,23 +713,30 @@ Inliner::Impl::inlineCallsInSCC(InlinerInterfaceImpl &inlinerIface,
   return success(inlinedAnyCalls);
 }
 
+static bool isSelfRecursiveFunction(CallGraphNode *node) {
+  return llvm::find_if(*node, [&](CallGraphNode::Edge const &edge) -> bool {
----------------
joker-eph wrote:

LLVM is west-const I believe:

```suggestion
  return llvm::find_if(*node, [&](const CallGraphNode::Edge &edge) -> bool {
```

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


More information about the Mlir-commits mailing list