[all-commits] [llvm/llvm-project] 96e336: [CodeGen][AMDGPU] Prepare rematerializer for subre...

Lucas Ramirez via All-commits all-commits at lists.llvm.org
Tue Jul 14 02:55:09 PDT 2026


  Branch: refs/heads/users/lucas-rami/rematerializer-prepare-subreg-nfc
  Home:   https://github.com/llvm/llvm-project
  Commit: 96e33686c3a7d51a40a64558844fccd0cb5bb5a2
      https://github.com/llvm/llvm-project/commit/96e33686c3a7d51a40a64558844fccd0cb5bb5a2
  Author: Lucas Ramirez <lucas.rami at proton.me>
  Date:   2026-07-14 (Tue, 14 Jul 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.


  Commit: d4de56f87d2280172669802f7e685a9d7121077c
      https://github.com/llvm/llvm-project/commit/d4de56f87d2280172669802f7e685a9d7121077c
  Author: Lucas Ramirez <lucas.rami at proton.me>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M llvm/lib/CodeGen/Rematerializer.cpp

  Log Message:
  -----------
  Re-add include


  Commit: 08006005b8e76e86d158e1f48f60cc3f218e6cfd
      https://github.com/llvm/llvm-project/commit/08006005b8e76e86d158e1f48f60cc3f218e6cfd
  Author: Lucas Ramirez <lucas.rami at proton.me>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M llvm/lib/CodeGen/Rematerializer.cpp

  Log Message:
  -----------
  Add other missing include


  Commit: b63da077dfd6f0126d2a45326bdb5f2e99f0f313
      https://github.com/llvm/llvm-project/commit/b63da077dfd6f0126d2a45326bdb5f2e99f0f313
  Author: Lucas Ramirez <lucas.rami at proton.me>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M llvm/include/llvm/CodeGen/Rematerializer.h

  Log Message:
  -----------
  Add missing LLVM_ABI


Compare: https://github.com/llvm/llvm-project/compare/cf95ce8e7b25...b63da077dfd6

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