[PATCH] D148018: [Assignment Tracking] Trunc fragments for stores to vars smaller than the alloca

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 07:56:58 PDT 2023


Orlando created this revision.
Orlando added a reviewer: jmorse.
Orlando added a project: debug-info.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Orlando requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In D147777 <https://reviews.llvm.org/D147777> emitDbgAssign was fixed to discard assignments which touched any bits outside the bounds of a variable. This patch changes emitDbgAssign to discard assignments which touch bits only outside the variable bounds, and creates a truncated fragment expression for stores partially overlapping the variable. This is necessary because the alloca is interpreted as a store (of undef), meaning  without this patch emitDbgAssign would discard the inital dbg.assign for a variable that is smaller than the alloca.


https://reviews.llvm.org/D148018

Files:
  llvm/lib/IR/DebugInfo.cpp
  llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/structured-bindings.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/var-not-alloca-sized.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148018.512460.patch
Type: text/x-patch
Size: 11332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230411/1cb005bb/attachment.bin>


More information about the llvm-commits mailing list