[PATCH] D98614: [AMDGPU] Fix shortfalls in WQM marking

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 02:28:41 PDT 2021


foad added a comment.

Just some nits inline.



================
Comment at: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp:346-347
+  };
+  SmallVector<const VNInfo *, 4> VisitOrder;
   SmallPtrSet<const VNInfo *, 4> Visited;
+  SmallVector<PhiEntry, 2> PhiStack;
----------------
I think you could use a SetVector here instead of a separate set and vector.


================
Comment at: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp:379
+
+      // If there are more precessors to process; add phi to stack
+      if (PI != PE)
----------------
"predecessors"


================
Comment at: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp:427
+      // Reach end of chain; revert to processing last phi
+      PhiEntry &Entry = PhiStack[PhiStack.size() - 1];
+      NextValue = Entry.Phi;
----------------
PhiStack.back()


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98614



More information about the llvm-commits mailing list