[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
Mon Aug 1 02:51:49 PDT 2022


StephenTozer added inline comments.


================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:2514
+    DbgOpID OutValOpID = OutVal.getDbgOpID(DbgOpIdx);
+    DbgOp OutValOp = DbgOpStore.find(OutValOpID);
+    assert(!OutValOp.IsConst);
----------------
StephenTozer wrote:
> jmorse wrote:
> > Take reference, avoiding large copy? May or may not have reallocation/invalidation issues.
> Probably sensible - though I think there's a fairly low-hanging fruit optimization to make DbgOp smaller, so it might be better to just fix up that particular thing and make this change unnecessary.
Actually, beyond just that potential optimization - there's no way to avoid the copy in this case, because `DbgOpIDMap.find()` creates a new DbgOp to return anyway, so there's no reference to take. The only resolution would be to have DbgOp itself contain a pointer/reference, which would be a more significant change.


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