[PATCH] D139732: [AMDGPU] Add pass to rewrite partially used virtual superregisters after RenameIndependentSubregs pass with registers of minimal size (WIP)

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 09:42:05 PST 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/GCNRewritePartialRegUses.cpp:302-305
+  if (LIS) {
+    LIS->removeInterval(Reg);
+    LIS->createAndComputeVirtRegInterval(NewReg);
+  }
----------------
vpykhtin wrote:
> arsenm wrote:
> > Can you do better than delete and recreate the liveness? Can we do this before liveness is computed?
> Liveness is required by the previous pass but this pass doesn't use it so I decided not to require it.
> 
> Liveness subranges aren't touched by this pass but some of them become main range instead of subrange. Subreg indexes and lanemasks need to be updated.
Do you only need to do splitSeparateComponents for each changed register?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139732/new/

https://reviews.llvm.org/D139732



More information about the llvm-commits mailing list