[llvm] [CodeGen] Add listener support to the rematerializer (NFC) (PR #184338)

Lucas Ramirez via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 06:28:49 PST 2026


lucas-rami wrote:

The listeners are meant as some form of opt-in capabilities, so to be able to mix and match them I don't think I can rely on subclassing (though there may be a better design pattern than the listener one that I am not thinking of).

For example the rematerializer at this point works based on "scheduling-like regions" but this is not fundamentally necessary and, same as rollback, forces it to track things that clients may not care about. Eventually I would like this to be part of a listener that can be freely registered or not with the rematerializer to offer that kind of region-based rematerialization (e.g., in the scheduler).

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


More information about the llvm-commits mailing list