[PATCH] D141679: [CodeGen][Dwarf] Generate global variable DIEs after all subprogram (and their abstract origin) DIEs

Juan Manuel Martinez CaamaƱo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 05:28:07 PST 2023


jmmartinez added a comment.

I'm sorry about the huge diff. Changing the order in which the DIEs where generated changed the order in which they appear in the output, which breaks a lot of tests.

I'll pick up any advice into how to deal with this problem.

- I'm considered submitting an hybrid approach to reduce the size of the diff (but I'm not sure it's worth it). I could split the generation of the DIEs for globals in two, to avoid introducing a change in the order of so many tests:
  1. first for DIGlobalVariables whose scope is not a DISubprogram,
  2. then for globals whose scope is a DISubprogram.

- I introduced a test based on the C code I showed in the commit message (`DebugInfo/X86/static-local-var.ll`).

- There are still 6 remaining tests to fix...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141679



More information about the llvm-commits mailing list