[PATCH] D95748: AMDGPU: Fix dbg_value handling when forming soft clause bundles
Scott Linder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 08:39:29 PST 2021
scott.linder added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp:390-392
+ auto BundleNext = I;
+ for (auto BI = I; BI != Next; BI = BundleNext) {
+ BundleNext = std::next(BI);
----------------
arsenm wrote:
> scott.linder wrote:
> > When does `Next != BundleNext` after this `for` terminates? It seems like you should be able to just use `Next` below when re-inserting the DBG instructions?
> It doesn't make a difference
I disagree that it doesn't matter, after reading to this point I have to assume either (a) I don't understand the code, or (b) there is a missing `assert(BundleNext == Next);`
Can you either delete `BundleNext` or add an assert?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95748/new/
https://reviews.llvm.org/D95748
More information about the llvm-commits
mailing list