When deleting the last rematerialization of a register, we should delete the rematerializer's remat tracking map's entry that corresponds to the index of the *original* register, not the rematerialized register. The existing typo has no impact on correctness at the moment because entries with rematerialized register indices are never created (so there is nothing to erase), and having an empty set in a value does not break any code invariant; it just wastes memory. Assisted-by: Claude Code
31 KiB
31 KiB