[llvm] [CodeGen] Add listener support to the rematerializer (NFC) (PR #184338)
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 07:29:11 PST 2026
================
@@ -186,6 +186,37 @@ class Rematerializer {
friend Rematerializer;
};
+ /// Rematerializer listener. Defines overridable hooks that allow to catch
+ /// specific events inside the rematerializer. All hooks do nothing by
+ /// default. Listeners can be added or removed at any time during the
+ /// rematerializer's lifetime.
+ class Listener {
+ private:
----------------
nhaehnle wrote:
I think the callbacks should be public. Calling them from outside the Listener is the whole point...
https://github.com/llvm/llvm-project/pull/184338
More information about the llvm-commits
mailing list