[PATCH] D133294: [Assignment Tracking][11/*] Update RemoveRedundantDbgInstrs

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 04:47:55 PST 2022


StephenTozer added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:391-392
       // iteration).
-      if (!R.second)
-        ToBeRemoved.push_back(DVI);
+      ToBeRemoved.push_back(DVI);
       continue;
     }
----------------
Orlando wrote:
> StephenTozer wrote:
> > 
> I think the continue is correct (this isn't the end of the loop, it's inside the `if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(&I))` block) - `continue` because we're still in a block of consecutive dbg intrinsics.
Ah, my bad - just misread it! LGTM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133294



More information about the llvm-commits mailing list