[PATCH] D135488: [codegen][WIP] Display stack layouts in console
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 19:35:46 PDT 2022
nickdesaulniers added a comment.
Playing around with `llvm-dwarfdump` today, I think I found an interesting example:
Consider the following DWARF DIE:
0x00017e5e: DW_TAG_variable
DW_AT_location (0x00002144:
[0x00000000000007c4, 0x00000000000007c8): DW_OP_reg8 W8
[0x00000000000007c8, 0x00000000000007d8): DW_OP_breg31 WSP+48
[0x00000000000007d8, 0x00000000000007e8): DW_OP_lit0, DW_OP_stack_value)
DW_AT_abstract_origin (0x00016776 "sp_el0")
How I read this: `sp_el0` is in `w8` while the program counter is from 0x7c4 until 0x7c8, at which point it's spilled to `wsp+48` until the program counter reaches 0x7e8 at which point (this gets hazy, but https://dwarfstd.org/ShowIssue.php?issue=100831.1 is worth a read) the value is "rematerializable?"
Though I also see DW_AT_location attributes getting pretty crazy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135488/new/
https://reviews.llvm.org/D135488
More information about the llvm-commits
mailing list