Disable the -gmlt optimization implemented in r218129 under Darwin due to issues...
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 30 Sep 2014 21:28:32 +0000 (21:28 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 30 Sep 2014 21:28:32 +0000 (21:28 +0000)
commit76ff19ffa7c3dd899aee66ab737649bf1643f7f5
treeebf076a09c00bcc6a8d235919f5950418e429fb6
parent73a335f7f6b56dfa1fa466368589247390f099b9
Disable the -gmlt optimization implemented in r218129 under Darwin due to issues with dsymutil.

r218129 omits DW_TAG_subprograms which have no inlined subroutines when
emitting -gmlt data. This makes -gmlt very low cost for -O0 builds.

Darwin's dsymutil reasonably considers a CU empty if it has no
subprograms (which occurs with the above optimization in -O0 programs
without any force_inline function calls) and drops the line table, CU,
and everything in this situation, making backtraces impossible.

Until dsymutil is modified to account for this, disable this
optimization on Darwin to preserve the desired functionality.
(see r218545, which should be reverted after this patch, for other
discussion/details)

Footnote:
In the long term, it doesn't look like this scheme (of simplified debug
info to describe inlining to enable backtracing) is tenable, it is far
too size inefficient for optimized code (the DW_TAG_inlined_subprograms,
even once compressed, are nearly twice as large as the line table
itself (also compressed)) and we'll be considering things like Cary's
two level line table proposal to encode all this information directly in
the line table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218702 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
test/DebugInfo/gmlt.ll