[PATCH] D68970: AMDGPU: Fix infinite searches in SIFixSGPRCopies

Austin Kerbow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 12:50:43 PDT 2019


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


================
Comment at: llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp:699-700
   unsigned numVGPRUses = 0;
   SetVector<const MachineInstr *> worklist;
+  SmallSet<const MachineInstr *, 4> Visited;
   worklist.insert(&MI);
----------------
arsenm wrote:
> Worklist is a SetVector already, so why does this need another set?
Instructions are removed from the worklist. It's to avoid adding the same ones again.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68970





More information about the llvm-commits mailing list