[Mlir-commits] [mlir] [RFC][mlir] Add profitability callback to the Inliner. (PR #84258)

Slava Zakharin llvmlistbot at llvm.org
Wed Mar 6 16:23:25 PST 2024


================
@@ -100,9 +100,12 @@ void InlinerPass::runOnOperation() {
     return signalPassFailure();
   }
 
+  // By default, assume that any inlining is profitable.
+  auto profitabilityCb = [](Inliner::ResolvedCall &) { return true; };
----------------
vzakhari wrote:

Sure, I can add it to showcase the usage. The percentage threshold sounds better to me as it involves analyzing both the caller and the callee.  One thing I am not clear about is what to consider "a caller".  I think it should be the first parent that is `IsolatedFromAbove`, but I am open to other ideas.

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


More information about the Mlir-commits mailing list