1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

DebugInfo: Put range base specifier entry functionality behind a flag

Chromium's gold build seems to have trouble with this (gold produces
errors) - not sure if it's gold that's not coping with the valid
representation, or a bug in the implementation in LLVM, etc.

llvm-svn: 309630
This commit is contained in:
David Blaikie 2017-07-31 21:48:42 +00:00
parent 0eff102dbe
commit 40fe1a4f74
2 changed files with 32 additions and 22 deletions

View File

@ -61,10 +61,14 @@ static cl::opt<bool>
DisableDebugInfoPrinting("disable-debug-info-print", cl::Hidden,
cl::desc("Disable debug info printing"));
static cl::opt<bool> UseDwarfRangesBaseAddressSpecifier(
"use-dwarf-ranges-base-address-specifier", cl::Hidden,
cl::desc("Disable debug info printing"), cl::init(false));
static cl::opt<bool>
GenerateGnuPubSections("generate-gnu-dwarf-pub-sections", cl::Hidden,
cl::desc("Generate GNU-style pubnames and pubtypes"),
cl::init(false));
GenerateGnuPubSections("generate-gnu-dwarf-pub-sections", cl::Hidden,
cl::desc("Generate GNU-style pubnames and pubtypes"),
cl::init(false));
static cl::opt<bool> GenerateARangeSection("generate-arange-section",
cl::Hidden,
@ -1882,7 +1886,8 @@ void DwarfDebug::emitDebugRanges() {
// or optnone where there may be holes in a single CU's section
// contrubutions.
auto *Base = CUBase;
if (!Base && P.second.size() > 1) {
if (!Base && P.second.size() > 1 &&
UseDwarfRangesBaseAddressSpecifier) {
BaseIsSet = true;
// FIXME/use care: This may not be a useful base address if it's not
// the lowest address/range in this object.

View File

@ -1,4 +1,5 @@
; RUN: llc -filetype=asm -mtriple=x86_64-pc-linux-gnu %s -o - | FileCheck %s
; RUN: llc -filetype=asm -mtriple=x86_64-pc-linux-gnu %s -o - -use-dwarf-ranges-base-address-specifier | FileCheck --check-prefix=COMMON --check-prefix=BASE %s
; RUN: llc -filetype=asm -mtriple=x86_64-pc-linux-gnu %s -o - | FileCheck --check-prefix=COMMON --check-prefix=NOBASE %s
; Group ranges in a range list that apply to the same section and use a base
; address selection entry to reduce the number of relocations to one reloc per
@ -13,23 +14,27 @@
; in the linked executable. Without compression in the objects, the win would be
; smaller (the growth of debug_ranges itself would be more significant).
; CHECK: {{^.Ldebug_ranges0}}
; CHECK-NEXT: .quad .Lfunc_begin0
; CHECK-NEXT: .quad .Lfunc_end0
; CHECK-NEXT: .quad -1
; CHECK-NEXT: .quad .Lfunc_begin1
; CHECK-NEXT: .quad .Lfunc_begin1-.Lfunc_begin1
; CHECK-NEXT: .quad .Lfunc_end1-.Lfunc_begin1
; CHECK-NEXT: .quad .Lfunc_begin3-.Lfunc_begin1
; CHECK-NEXT: .quad .Lfunc_end3-.Lfunc_begin1
; CHECK-NEXT: .quad -1
; CHECK-NEXT: .quad 0
; CHECK-NEXT: .quad .Lfunc_begin4
; CHECK-NEXT: .quad .Lfunc_end4
; CHECK-NEXT: .quad .Lfunc_begin5
; CHECK-NEXT: .quad .Lfunc_end5
; CHECK-NEXT: .quad 0
; CHECK-NEXT: .quad 0
; COMMON: {{^.Ldebug_ranges0}}
; COMMON-NEXT: .quad .Lfunc_begin0
; COMMON-NEXT: .quad .Lfunc_end0
; BASE-NEXT: .quad -1
; BASE-NEXT: .quad .Lfunc_begin1
; BASE-NEXT: .quad .Lfunc_begin1-.Lfunc_begin1
; BASE-NEXT: .quad .Lfunc_end1-.Lfunc_begin1
; BASE-NEXT: .quad .Lfunc_begin3-.Lfunc_begin1
; BASE-NEXT: .quad .Lfunc_end3-.Lfunc_begin1
; BASE-NEXT: .quad -1
; BASE-NEXT: .quad 0
; NOBASE-NEXT: .quad .Lfunc_begin1
; NOBASE-NEXT: .quad .Lfunc_end1
; NOBASE-NEXT: .quad .Lfunc_begin3
; NOBASE-NEXT: .quad .Lfunc_end3
; COMMON-NEXT: .quad .Lfunc_begin4
; COMMON-NEXT: .quad .Lfunc_end4
; COMMON-NEXT: .quad .Lfunc_begin5
; COMMON-NEXT: .quad .Lfunc_end5
; COMMON-NEXT: .quad 0
; COMMON-NEXT: .quad 0
; Function Attrs: noinline nounwind optnone uwtable
define void @_Z2f1v() #0 section "a" !dbg !7 {