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

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 01:41:27 PDT 2023


qcolombet added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/GCNRewritePartialRegUses.cpp:73
+
+  mutable SmallDenseMap<std::pair<unsigned, unsigned>, unsigned> SubRegs;
+
----------------
We need comments on all these fields and methods.
- What they hold
- What they do
etc.


For instance I have no idea what this mapping hold.
I am guessing it is mapping a pair (Reg, Subreg) to a new vreg, but having a comment for that would be great.

Similarly I don't know what `rewriteReg` does and why it returns a `bool`.


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