[PATCH] D118419: [AMDGPU] Allow scalar loads after barrier
Valery Pykhtin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 06:45:23 PST 2022
vpykhtin added a comment.
Looks almost good
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp:92
+ while (!WorkList.empty()) {
+ MemoryAccess *MA = WorkList.pop_back_val();
+ if (!Visited.insert(MA).second)
----------------
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.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp:110
+
+ if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(DefInst)) {
+ switch (II->getIntrinsicID()) {
----------------
It may worth to make a function like isReallyAClobber just to deduplicate code a bit
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118419/new/
https://reviews.llvm.org/D118419
More information about the llvm-commits
mailing list