[llvm] [CodeGen] Move rollback capabilities outside of the rematerializer (PR #184341)
Lucas Ramirez via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 05:02:15 PDT 2026
================
@@ -361,27 +355,26 @@ class Rematerializer {
MachineBasicBlock::iterator InsertPos,
DependencyReuseInfo &DRI);
- /// Rolls back all rematerializations of original register \p RootIdx,
- /// transfering all their users back to it and permanently deleting them from
- /// the MIR. The root register is revived if it was fully rematerialized (this
- /// requires that rollback support was set at that time). Transitive
- /// dependencies of the root register that were fully rematerialized are
- /// re-vived at their original positions; this requires that rollback support
- /// was set when they were rematerialized.
- void rollbackRematsOf(RegisterIdx RootIdx);
-
- /// Rolls back register \p RematIdx (which must be a rematerialization)
- /// transfering all its users back to its origin. The latter is revived if it
- /// was fully rematerialized (this requires that rollback support was set at
- /// that time).
- void rollback(RegisterIdx RematIdx);
-
- /// Revives original register \p RootIdx at its original position in the MIR
- /// if it was fully rematerialized with rollback support set. Transitive
- /// dependencies of the root register that were fully rematerialized are
- /// revived at their original positions; this requires that rollback support
- /// was set when they were themselves rematerialized.
- void reviveRegIfDead(RegisterIdx RootIdx);
+ /// Rematerializes register \p RegIdx at \p InsertPos in \p UseRegion, adding
----------------
lucas-rami wrote:
It's before, I will clarify.
https://github.com/llvm/llvm-project/pull/184341
More information about the llvm-commits
mailing list