[PATCH] D136267: [AMDGPU] Speedup GCNDownwardRPTracker::advanceBeforeNext

Valery Pykhtin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 23:55:44 PDT 2022


vpykhtin marked an inline comment as done.
vpykhtin added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/GCNRegPressure.cpp:387
+      if (It != LiveRegs.end() && It->second.none())
+        LiveRegs.erase(It);
     } else if (!LI.liveAt(SI)) {
----------------
arsenm wrote:
> vpykhtin wrote:
> > arsenm wrote:
> > > vpykhtin wrote:
> > > > arsenm wrote:
> > > > > I don't understand why LiveRegs is a map in the first place
> > > > The map consists of pairs register:lanemask
> > > Yes, but tracking it this way doesn't really make sense to me. Does this really need to be erased?
> > I'm not sure: do you mean leaving zero lanemask instead of erasing?
> > 
> > 
> > 
> > 
> Yes  (although I guess you aren't really changing the behavior here)
It would require checking all dependent code and I don't think it makes big impact as a register is deleted by the iterator


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136267



More information about the llvm-commits mailing list