[PATCH] D121107: [DebugInfo][SROA] Correct debug info for global variables in case of SROA
Alok Kumar Sharma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 9 02:10:05 PST 2022
alok added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:423
+ // Current variable ends before start of fragment, ignore.
+ if ((CurVarSize != 0) &&
+ ((CurVarOffset + CurVarSize) <= FragmentOffsetInBits))
----------------
djtodoro wrote:
> we have some extra parentheses here
Thanks. It will be removed in next version.
================
Comment at: llvm/test/DebugInfo/Generic/global-sra-struct-fit-segment.ll:1
+; REQUIRES: x86_64-linux
+
----------------
Orlando wrote:
> Can you move this to `llvm/test/DebugInfo/X86`? The tests there only run if `X86` is a registered target.
Sure, it'll be moved.
================
Comment at: llvm/test/DebugInfo/Generic/global-sra-struct-fit-segment.ll:99-101
+declare i32 @__atomic_compare_exchange(i64, i8* noalias, i8* noalias, i8* noalias, i32, i32)
+
+declare i64 @__tgt_fort_ptr_assn_i8(i8* noalias, i8* noalias, i8* noalias, i8* noalias, i8* noalias)
----------------
djtodoro wrote:
> unused, so it can be deleted
Sure, I'll be deleted.
================
Comment at: llvm/test/DebugInfo/Generic/global-sra-struct-fit-segment.ll:108
+; CHECK-DAG: ![[GVE2]] = !DIGlobalVariableExpression(var: !8, expr: !DIExpression())
+; CHECK-DAG: ![[GVE3]] = !DIGlobalVariableExpression(var: !11, expr: !DIExpression())
+
----------------
djtodoro wrote:
> Orlando wrote:
> > Please can you replace the hardcoded metadata (`!1`, `!8`, `!22`) in these check lines?
> +1
Sure, will do.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121107/new/
https://reviews.llvm.org/D121107
More information about the llvm-commits
mailing list