[PATCH] D139732: [AMDGPU] Add pass to rewrite partially used virtual superregisters after RenameIndependentSubregs pass with registers of minimal size.
Valery Pykhtin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 21:19:04 PST 2023
vpykhtin added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/GCNRewritePartialRegUses.cpp:302-305
+ if (LIS) {
+ LIS->removeInterval(Reg);
+ LIS->createAndComputeVirtRegInterval(NewReg);
+ }
----------------
arsenm wrote:
> arsenm wrote:
> > 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?
> Ping on this, can you just do splitSeparateComponents? I don't see why you have to mutate the existing interval
I'm not sure what splitSeparateComponents does, but my code doesn't create separate intervals. It "shifts" subregs to the right and uses smallest possible superreg. I only need to update subreg indexes and remove covering subreg.
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