[PATCH] D136335: [Assignment Tracking Analysis][5/*] Tests

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 03:12:25 PST 2022


Orlando added inline comments.


================
Comment at: llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll:89-97
+;; ╔═════════════╦══════════════════════════╦═════════════════╦══════════════════════════╗
+;; ║ block       ║ in                       ║ def             ║ out                      ║
+;; ╠═════════════╬══════════════════════════╬═════════════════╬══════════════════════════╣
+;; ║ entry       ║                          ║ mem=!77 dbg=!78 ║ mem=!77 dbg=!78 loc=val  ║
+;; ║ do.body     ║ mem=!77 dbg=phi loc=none ║         dbg=!77 ║ mem=!77 dbg=!77 loc=mem  ║
+;; ║ do.body1    ║ mem=!77 dbg=!77 loc=mem  ║         dbg=!77 ║ mem=!77 dbg=!77 loc=mem  ║
+;; ║ if.then     ║ mem=!77 dbg=!77 loc=mem  ║ mem=!77         ║ mem=!77 dbg=!77 loc=mem  ║
----------------
jmorse wrote:
> To help my understanding -- the dbg=phi on entry to do.body is because entry feeds in constant-value 9, while the assignment in do.body1 feeds in constant-value 8, yes? While stores of !77 to the stack location dominate from entry onwards.
>  the dbg=phi on entry to do.body is because entry feeds in constant-value 9, while the assignment in do.body1 feeds in constant-value 8, yes

Yes except it's the DIAssignIDs associated with those constant-value dbg.assigns being different that matters, rather than the constant values. The 8 and 9 could both be 8, for example, and the table would look the same.

> While stores of !77 to the stack location dominate from entry onwards.

Yep



================
Comment at: llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll:160
+  store i32 9, ptr %e.addr, !DIAssignID !78 ; VAR:e
+  call void @llvm.dbg.assign(metadata i32 9, metadata !75, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 32), metadata !78, metadata ptr %e.addr, metadata !DIExpression()), !dbg !27 ; VAR:c
+  store i32 3, ptr %a.addr, !DIAssignID !63 ; VAR:a
----------------
Note to self: the end of line comment above should be `VAR:e` rather than `VAR:c`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136335/new/

https://reviews.llvm.org/D136335



More information about the llvm-commits mailing list