llvm-6502/lib/CodeGen/AsmPrinter
Duncan P. N. Exon Smith 7838051bda DwarfDebug: Emit number of bytes in .debug_loc entry directly
Emit the number of bytes in a `.debug_loc` entry directly.  The old code
created temp labels (expensive), emitted the difference between them,
and then emitted one on each side of the relevant bytes.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`
(the optimized version of ld64's `-save-temps` when linking the
`verify-uselistorder` executable in an LTO bootstrap).  I've hacked
`MCContext::Allocate()` to just call `malloc()` instead of using the
`BumpPtrAllocator` so that the heap profile is easier to read.  As far
as peak memory is concerned, `MCContext::Allocate()` is equivalent to a
leak, since it only gets freed at process teardown.

In my heap profile, this patch drops memory usage of
`DwarfDebug::emitDebugLoc()` from 132.56 MB (11.4%) down to 29.86 MB
(2.7%) at peak memory.  Some of that must be noise from `SmallVector`
(or other) allocations -- peak memory only dropped from 1160 MB down to
1100 MB -- but this nevertheless shaves 5% off the top.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236629 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 19:11:20 +00:00
..
AddressPool.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
AddressPool.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
ARMException.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
AsmPrinter.cpp Re-land "[WinEH] Add an EH registration and state insertion pass for 32-bit x86" 2015-05-05 17:44:16 +00:00
AsmPrinterDwarf.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
AsmPrinterHandler.h Print jump tables before exception tables. 2015-03-09 18:29:12 +00:00
AsmPrinterInlineAsm.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
ByteStreamer.h [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
CMakeLists.txt Debug info: Factor out the creation of DWARF expressions from AsmPrinter 2015-01-12 22:19:22 +00:00
DbgValueHistoryCalculator.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DbgValueHistoryCalculator.h IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DebugLocEntry.h IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DebugLocStream.h AsmPrinter: Create a unified .debug_loc stream 2015-04-17 21:34:47 +00:00
DIE.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
DIEHash.cpp AsmPrinter: Create a unified .debug_loc stream 2015-04-17 21:34:47 +00:00
DIEHash.h [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
DwarfAccelTable.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
DwarfAccelTable.h Store an optional section start label in MCSection. 2015-03-10 16:58:10 +00:00
DwarfCFIException.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
DwarfCompileUnit.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DwarfCompileUnit.h IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DwarfDebug.cpp DwarfDebug: Emit number of bytes in .debug_loc entry directly 2015-05-06 19:11:20 +00:00
DwarfDebug.h IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DwarfException.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
DwarfExpression.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DwarfExpression.h IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DwarfFile.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DwarfFile.h IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DwarfStringPool.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
DwarfStringPool.h [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
DwarfUnit.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DwarfUnit.h IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
EHStreamer.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
EHStreamer.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
ErlangGCPrinter.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
LLVMBuild.txt
Makefile
OcamlGCPrinter.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
Win64Exception.cpp [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr. 2015-04-24 19:11:51 +00:00
Win64Exception.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
WinCodeViewLineTables.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
WinCodeViewLineTables.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00