[PATCH] D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions.

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 10 00:24:23 PDT 2021


djtodoro added a comment.

In D87302#2275050 <https://reviews.llvm.org/D87302#2275050>, @jroelofs wrote:

> I know almost nothing about how DebugInfo is represented in llvm/dwarf, but is there not a way to represent what this transformation is doing in DI? It's always a little sad when you have to drop it, since doing so makes the debug experience worse.

I know a bit more about llvm di/dwarf, but I am also wondering if there is an idea on how to improve this in terms of Debug Info. In order to support Debug Info for Inlined functions, DWARF was extended to meet the requirements. I guess this will need something like that -- on both MIR and IR versions of the pass. Any thoughts about this?

Other than the comment for the test, this looks reasonable to me.



================
Comment at: llvm/test/DebugInfo/AArch64/ir-outliner.ll:170
+; IRDEBUG-NEXT: !22 = distinct !DISubprogram(name: "outline_debug2", linkageName: "outline_debug2", scope: null, file: !1, line: 11, type: !7, scopeLine: 11, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !23)
+; IRDEBUG-NEXT: !23 = !{!24, !25, !26, !27, !28, !29}
+; IRDEBUG-NEXT: !24 = !DILocalVariable(name: "7", scope: !22, file: !1, line: 11, type: !10)
----------------
It is bad practice to hardcode metadata numbers in tests since they change, so please make it more flexible by using regular expressions and the check variables.


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

https://reviews.llvm.org/D87302



More information about the llvm-commits mailing list