[DebugInfo] Only create concrete DIEs of concrete functions
authorEllis Hoag <ellis.sparky.hoag@gmail.com>
Tue, 9 Nov 2021 18:52:10 +0000 (10:52 -0800)
committerKyungwoo Lee <kyulee@fb.com>
Tue, 9 Nov 2021 18:52:34 +0000 (10:52 -0800)
commitf19471a24985a0cbc32b6548c8fce1d2514e8243
tree4bae8f97b8a31ff4e2f61117ffeb415ba413316f
parentadc7d63f46a70e68c60ecd4ad17f09eb6f4abbca
[DebugInfo] Only create concrete DIEs of concrete functions

At the begining of the module we can iterate through the functions to
see which SPs should have concrete DIEs. Then when we need to reference
a DIE for a SP we can decide if it's ok to create a concrete DIE or not.

Fixes
 * https://bugs.llvm.org/show_bug.cgi?id=52159
 * https://bugs.llvm.org/show_bug.cgi?id=30637

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D112337
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/test/DebugInfo/Generic/import-inlined-declaration.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/inlined-local-type.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/inlined-static-var.ll [new file with mode: 0644]