llvm-6502/test/DebugInfo/X86
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
..
2010-04-13-PubType.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
2011-09-26-GlobalVarContext.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
2011-12-16-BadStructRef.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
aligned_stack_var.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
arange-and-stub.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
arange.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
arguments.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
array2.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
array.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
asm-macro-line-number.s IAS: correct debug line info for asm macros 2014-12-24 06:32:43 +00:00
block-capture.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
byvalstruct.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
c-type-units.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
coff_debug_info_type.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
coff_relative_names.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
concrete_out_of_line.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
constant-aggregate.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
cu-ranges-odr.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
cu-ranges.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
data_member_location.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg_value_direct.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-asm.s MC: correct DWARF line info for PE/COFF 2014-09-06 19:57:48 +00:00
dbg-at-specficiation.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-byval-parameter.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-const-int.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-const.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-declare-arg.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-declare.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-file-name.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-i128-const.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-merge-loc-entry.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-prolog-end.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-subrange.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-value-const-byref.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-value-dag-combine.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-value-inlined-parameter.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-value-isel.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-value-location.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dbg-value-range.ll DwarfDebug: Emit number of bytes in .debug_loc entry directly 2015-05-06 19:11:20 +00:00
dbg-value-terminator.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug_frame.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug-dead-local-var.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug-info-access.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug-info-block-captured-self.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug-info-blocks.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug-info-static-member.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug-loc-asan.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug-loc-offset.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug-ranges-offset.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
decl-derived-member.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
deleted-bit-piece.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
discriminator.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DW_AT_byte_size.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DW_AT_linkage_name.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DW_AT_location-reference.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DW_AT_object_pointer.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DW_AT_specification.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DW_AT_stmt_list_sec_offset.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DW_TAG_friend.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dwarf-aranges-no-dwarf-labels.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dwarf-aranges.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dwarf-public-names.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
dwarf-pubnames-split.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
earlydup-crash.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
elf-names.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
empty-and-one-elem-array.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
empty-array.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
empty.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
ending-run.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
enum-class.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
enum-fwd-decl.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
fission-cu.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
fission-hash.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
fission-inline.ll DebugInfo: Use low_pc relative debug_ranges under fission when the CU has a low_pc 2015-05-02 02:31:49 +00:00
fission-ranges.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
float_const.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
formal_parameter.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
frame-register.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
generate-odr-hash.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
ghost-sdnode-dbgvalues.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
gmlt.test llvm/test/DebugInfo/X86/gmlt.test: Get rid of %llc_dwarf. It should not be used with -mtriple. 2014-10-01 00:29:16 +00:00
gnu-public-names-empty.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
gnu-public-names.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
header.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
inline-member-function.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
inline-seldag-test.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
inlined-formal-parameter.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
InlinedFnLocalVar.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
instcombine-instrinsics.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
lexical_block.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
line-info.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
line.test Refactor test to be reused across architectures 2015-01-29 20:21:24 +00:00
linkage-name.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
lit.local.cfg Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
low-pc-cu.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
main-file-name.s
memberfnptr.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
mi-print.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
misched-dbg-value.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
missing-file-line.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
multiple-aranges.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
multiple-at-const-val.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
nodebug_with_debug_loc.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
nondefault-subrange-array.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
nophysreg.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
objc-fwd-decl.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
objc-property-void.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
op_deref.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
parameters.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
pieces-1.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
pieces-2.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
pieces-3.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
pointer-type-size.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
pr11300.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
pr12831.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
pr13303.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
pr19307.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
processes-relocations.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
prologue-stack.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
recursive_inlining.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
ref_addr_relocation.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
reference-argument.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
rvalue-ref.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
sret.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
sroasplit-1.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
sroasplit-2.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
sroasplit-3.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
sroasplit-4.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
sroasplit-5.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
stmt-list-multiple-compile-units.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
stmt-list.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
stringpool.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
struct-loc.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
subrange-type.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
subreg.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
subregisters.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
template.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
tls.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
type_units_with_addresses.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
union-const.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
union-template.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
vector.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
vla.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00