[all-commits] [llvm/llvm-project] 910696: [Assignment Tracking][SROA] Don't un-poison dbg.as...
Orlando Cazalet-Hyams via All-commits
all-commits at lists.llvm.org
Tue Apr 11 10:18:39 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9106960724b5c8b0e3ba333238571cbbd3c10130
https://github.com/llvm/llvm-project/commit/9106960724b5c8b0e3ba333238571cbbd3c10130
Author: OCHyams <orlando.hyams at sony.com>
Date: 2023-04-11 (Tue, 11 Apr 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/SROA.cpp
M llvm/test/DebugInfo/Generic/assignment-tracking/sroa/fail-fragment.ll
Log Message:
-----------
[Assignment Tracking][SROA] Don't un-poison dbg.assigns using multiple loc ops
Some dbg.assigns using poison become un-poisoned in SROA. The reason this
happens at all is because dbg.assigns linked to memory intrinsics use poison to
indicate they can't describe the stored value, but the value becomes available
after some optimisations. This needs reworking eventually, but for now we need
to ensure that when it does occur we don't create invalid expressions.
D147312 prevented this occuring when the dbg.assign uses DIArgLists, but that
wasn't a complete fix. We also need to ensure we avoid un-poisoning when the
existing expression uses more than one location operand (DW_OP_arg, n).
Reviewed By: jmorse
Differential Revision: https://reviews.llvm.org/D148020
Commit: d05b5709881f15973aab6b1d463d919cd152f770
https://github.com/llvm/llvm-project/commit/d05b5709881f15973aab6b1d463d919cd152f770
Author: OCHyams <orlando.hyams at sony.com>
Date: 2023-04-11 (Tue, 11 Apr 2023)
Changed paths:
M llvm/lib/IR/DebugInfo.cpp
A llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/structured-bindings.ll
A llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/var-not-alloca-sized.ll
Log Message:
-----------
[Assignment Tracking] Trunc fragments for stores to vars smaller than the alloca
In 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.
Reviewed By: jmorse
Differential Revision: https://reviews.llvm.org/D148018
Compare: https://github.com/llvm/llvm-project/compare/20b929b29732...d05b5709881f
More information about the All-commits
mailing list