[PATCH] DebugInfo: Remove 'inlinedAt:' field from MDLocalVariable/DIVariable

Duncan P. N. Exon Smith dexonsmith at apple.com
Wed Apr 1 23:33:43 PDT 2015


When I was gathering LTO heap profiles a few weeks ago, the single
largest `Metadata` contributer to memory usage was `MDLocalVariable`,
with a huge chunk coming from `MDLocalVariable::withInline()`.

This patch stops storing where an `MDLocalVariable` has been inlined.
This inlined-at info was used two ways:

  - To tell the backend where a variable was inlined.
  - To create a unique id for each inlined variable.

However, every instruction has a `!dbg` attachment with the same
information in its inlined-at field.  AFAICT, David Blaikie's work to
make that accurate has paid off, since this naive patch (which just
removes the field entirely) passes all the tests.

The unique id for inlined variables is now a typedef called
`InlinedVariable` of `std::pair<MDLocalVariable*, MDLocation*>`.

Besides the patch, I've attached the upgrade script I used to update
testcases.

Any reason not to commit?  (Am I missing something here?)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-DebugInfo-Remove-inlinedAt-field-from-MDLocalVariabl.patch
Type: application/octet-stream
Size: 68805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150401/d85dbf32/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdlocalvariable-drop-inlinedat.sh
Type: application/octet-stream
Size: 2323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150401/d85dbf32/attachment-0001.obj>


More information about the llvm-commits mailing list