[PATCH] D138992: [DebugInfo][SROA] Correct debug info for global variables spanning multiple fragments in case of SROA
Jeremy Morse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 30 03:02:44 PST 2022
jmorse added a comment.
Before digging into the code, I'm not sure I understand the failing IR completely -- for the segment:
%struct.BSS3 = type <{ [24 x i8] }>
@.BSS3 = internal unnamed_addr global %struct.BSS3 zeroinitializer, align 32, !dbg !0, !dbg !7, !dbg !29
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "bar1", scope: !2, file: !4, type: !12, isLocal: true, isDefinition: true)
!12 = !DICompositeType(tag: DW_TAG_array_type, baseType: !13, size: 96, align: 32, elements: !14)
Isn't the debug-info type for the global variable wrong? 24 bytes (broken into 3 doubles by SROA) is 192 bits, which is surely the cause of the "fragment is larger than or outside of variable" when SROA splits the 24 bytes into 3 doubles.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138992/new/
https://reviews.llvm.org/D138992
More information about the llvm-commits
mailing list