[PATCH] D118419: [AMDGPU] Allow scalar loads after barrier

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 1 11:17:21 PST 2022


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp:92
+  while (!WorkList.empty()) {
+    MemoryAccess *MA = WorkList.pop_back_val();
+    if (!Visited.insert(MA).second)
----------------
vpykhtin wrote:
> This can be moved to the bottom of the loop, so you don't need to push first MA and just use it through the first iteration of the loop. The loop would be do-while then. In a case of lucky you won't hit any push.
There are a lot of 'continue' here. I need to pop_back the worklist somewhere. Then this is SmallVector and some stack is already preallocated and just initialized.


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

https://reviews.llvm.org/D118419



More information about the llvm-commits mailing list