[PATCH] D98614: [AMDGPU] Fix shortfalls in WQM marking
Carl Ritson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 15 05:23:17 PDT 2021
critson marked 6 inline comments as done.
critson added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp:368-370
+ for (; PI != PE && !NextValue; ++PI, ++Idx) {
+ if (Idx < NextPredIdx)
+ continue;
----------------
piotr wrote:
> critson wrote:
> > piotr wrote:
> > > Instead of starting with Idx = 0 and skipping, can you start with Idx = NextPredIdx? That would remove the need for the "continue".
> > What is happening here is we are skipping through the list of predecessor blocks to the correct number. I do not think there is a way to access a specific predecessor by index?
> auto PI = MBB->pred_begin() + NextPredIdx; ?
Thanks!
I didn't know you could do that with iterators.
(You can see the limits of my C++ knowledge.)
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