[Mlir-commits] [mlir] [RFC][mlir] Add profitability callback to the Inliner. (PR #84258)
Mehdi Amini
llvmlistbot at llvm.org
Wed Mar 6 16:09:58 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.
----------------
joker-eph wrote:
Yes I suspect we'll evolve this into a class with multiple callbacks to be able to track the program and cache analysis (and so invalidate the cache...).
It may be good enough to start that way of course.
https://github.com/llvm/llvm-project/pull/84258
More information about the Mlir-commits
mailing list