diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-05-06 19:11:20 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-05-06 19:11:20 +0000 |
commit | 653c1099b40957d836dd85d81449e35a22e4558d (patch) | |
tree | cb757287df3e8abb074436719f4743f5e1c5b39e /llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll | |
parent | 61533772196bf287dca07e1a9a38915c70a20c46 (diff) | |
download | bcm5719-llvm-653c1099b40957d836dd85d81449e35a22e4558d.tar.gz bcm5719-llvm-653c1099b40957d836dd85d81449e35a22e4558d.zip |
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.)
llvm-svn: 236629
Diffstat (limited to 'llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll b/llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll index 788853e4308..3670c556aa7 100644 --- a/llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll +++ b/llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll @@ -77,18 +77,12 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon ; CHECK-NEXT: .quad [[SET1]] ; CHECK-NEXT: [[SET2:.*]] = [[LABEL]]-Lfunc_begin0 ; CHECK-NEXT: .quad [[SET2]] -; CHECK-NEXT: Lset{{.*}} = Ltmp{{.*}}-Ltmp{{.*}} ## Loc expr size -; CHECK-NEXT: .short Lset{{.*}} -; CHECK-NEXT: Ltmp{{.*}}: +; CHECK-NEXT: .short 1 ## Loc expr size ; CHECK-NEXT: .byte 85 -; CHECK-NEXT: Ltmp{{.*}}: ; CHECK-NEXT: [[SET3:.*]] = [[LABEL]]-Lfunc_begin0 ; CHECK-NEXT: .quad [[SET3]] ; CHECK-NEXT: [[SET4:.*]] = [[CLOBBER]]-Lfunc_begin0 ; CHECK-NEXT: .quad [[SET4]] -; CHECK-NEXT: Lset{{.*}} = Ltmp{{.*}}-Ltmp{{.*}} ## Loc expr size -; CHECK-NEXT: .short Lset{{.*}} -; CHECK-NEXT: Ltmp{{.*}}: +; CHECK-NEXT: .short 1 ## Loc expr size ; CHECK-NEXT: .byte 83 -; CHECK-NEXT: Ltmp{{.*}}: !38 = !{i32 1, !"Debug Info Version", i32 3} |