[PATCH] D95748: AMDGPU: Fix dbg_value handling when forming soft clause bundles
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 08:47:38 PST 2021
arsenm 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);
----------------
scott.linder wrote:
> 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?
BundleNext is needed for incrementing the inner loop up to Next
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95748/new/
https://reviews.llvm.org/D95748
More information about the llvm-commits
mailing list