[PATCH] D128180: [DebugInfo][InstrRef][NFC] Let LDV handle joins for lists of debug ops

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 06:52:54 PDT 2022


StephenTozer added inline comments.


================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:2464-2468
-      // For VPHIs where we don't know the location, we definitely can't find
-      // a join loc.
-      if (OutVal.BlockNo != MBB.getNumber())
-        return None;
-
----------------
jmorse wrote:
> Deleting this makes me twitch a little; and it looks like the code and comment are out of sync, the test is for whether this is a backedge (VPHI defined in the current block feeding back into itself).
> 
> I think the way this would fail is where there's an arbitrary, unresolved VPHI feeding into a block: I think without this test, we would then treat it like a live-through value, even if it ends up being something different. There might be some other portion of code that stops such an error being visible.
> 
> Does that make sense / is there a positive reason for deleting this?
Yes -  the reason it's deleted here is because the check has been shunted up to `pickVPHILoc`, before we reach this function; see line 2449:

```
    // For unjoined VPHIs where we don't know the location, we definitely
    // can't find a join loc unless the VPHI is a backedge.
    if (OutVal.isUnjoinedPHI() && OutVal.BlockNo != MBB.getNumber())
      return false;
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128180



More information about the llvm-commits mailing list