[Mlir-commits] [mlir] [RFC][mlir] Add profitability callback to the Inliner. (PR #84258)
Mehdi Amini
llvmlistbot at llvm.org
Wed Mar 6 16:08:48 PST 2024
================
@@ -94,7 +81,29 @@ class Inliner {
CallGraphNode *sourceNode, *targetNode;
};
-protected:
+ using RunPipelineHelperTy = std::function<LogicalResult(
+ Pass &pass, OpPassManager &pipeline, Operation *op)>;
+
+ /// Type of the callback answering if it is profitable
+ /// to inline a callable operation at a call site.
+ /// It might be the case that the ResolvedCall does not provide
+ /// enough context to make the profitability decision, so
+ /// this hook's interface might need to be extended in future.
+ using ProfitabilityCallbackTy = std::function<bool(ResolvedCall &)>;
----------------
joker-eph wrote:
The resolvedCall can be const here right?
https://github.com/llvm/llvm-project/pull/84258
More information about the Mlir-commits
mailing list