[PATCH] D158171: [instcombine] Sunk instruction introduces unnecessary poison dbg.value

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 03:54:39 PDT 2023


CarlosAlbertoEnciso added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3863
+  // found by 'findDbgUsers'. If that is the case, those debug variables
+  // must be preserved from any salvage debug use.
+  SmallVector<DbgVariableIntrinsic *, 2> DbgUsersToSalvage;
----------------
aprantl wrote:
> Looking at the testcase, this seems good, I just have trouble parsing the comment: what does "preserved from any salvage debug use" mean?
May be changing the comment to:

```
// For all debug values in the destination block, the sunk instruction
// will still be available, so they do not need to be dropped.
```

will add clarity.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158171



More information about the llvm-commits mailing list