[all-commits] [llvm/llvm-project] f6e09b: [CodeGen][AMDGPU] Prepare rematerializer for subre...
Lucas Ramirez via All-commits
all-commits at lists.llvm.org
Tue Jun 9 07:24:50 PDT 2026
Branch: refs/heads/users/lucas-rami/rematerializer-prepare-subreg-nfc
Home: https://github.com/llvm/llvm-project
Commit: f6e09bb2f2cf4cb367b124f46b18ef7321069648
https://github.com/llvm/llvm-project/commit/f6e09bb2f2cf4cb367b124f46b18ef7321069648
Author: Lucas Ramirez <lucas.rami at proton.me>
Date: 2026-06-09 (Tue, 09 Jun 2026)
Changed paths:
M llvm/include/llvm/CodeGen/Rematerializer.h
M llvm/lib/CodeGen/Rematerializer.cpp
M llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
M llvm/unittests/CodeGen/RematerializerTest.cpp
Log Message:
-----------
[CodeGen][AMDGPU] Prepare rematerializer for subreg remat support (NFC)
This makes some NFCs to the rematerializer before starting to improve
support for sub-register rematerialization. The main changes are the
replacement of `Rematerializer::Reg::Dependency` type (essentially a
pair of a machine operand index and a register index) in favor of a
simple register index, dropping the machine operand index. The latter
has no current uses and will lose meaning once we allow rematerializable
registers to be defined by multiple MIs. Similarly, and for the same
rationale, unrematerializable register dependencies are now tracked as
a register/lanemask pair instead of a machine operand index.
Other minor changes listed below.
- Removal of `DefRegion` argument to `Rematerializer::recreteReg`.
Registers are always re-created in their original region so there is
no need to set their region again.
- Removal of `InsertPos` unused argument to
`Rematerializer::postRematerialization`.
- Refactor of how AMDGPU's scheduler checks whether a given register is
rematerializable. This will make the future functional change for
subreg support minimal.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list