[PATCH] D128252: [AMDGPU] VGPR to SGPR copies lowering

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 4 08:16:37 PDT 2022


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp:940
+  // current copy SChain
+  unsigned SiblingPenaulty = 0;
+  SetVector<unsigned> Siblings;
----------------
Spelling "penalty"


================
Comment at: llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp:957
+  DenseMap<unsigned, V2SCopyInfo> Copies;
+  DenseMap<MachineInstr *, SetVector<unsigned>> SiblingPenaulty;
+
----------------
Spelling "penalty"


================
Comment at: llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp:970
+    I->Siblings.remove_if([&](unsigned ID) { return ID == I->ID;});
+    SetVector<Register> SrcRegs;
+    for (auto J : I->Siblings) {
----------------
Can just be a set, doesn't need to be a SetVector


================
Comment at: llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp:1025
+      // forks and joins. We should not then go same way twice.
+      SetVector<MachineInstr*> Visited;
+      worklist.push_back(&MI);
----------------
Can just be a set, doesn't need to be a SetVector


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128252



More information about the llvm-commits mailing list