Skip to content

Commit fb27476

Browse files
committed
Auto merge of #154468 - Kobzol:revert-154200, r=dingxiangfei2009
Revert "Rollup merge of #154200 - resrever:enable-dwarf-call-sites, r=dingxiangfei2009" This reverts commit 2f16030, reversing changes made to 6e3c174. Debugging perf. hit from #154384. The binary size hits from #154468 (comment) were due to this PR, not all of the copmile-time hits though.
2 parents 0d4eb09 + 8b44562 commit fb27476

File tree

4 files changed

+3
-28
lines changed

4 files changed

+3
-28
lines changed

‎compiler/rustc_codegen_llvm/src/debuginfo/mod.rs‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
471471
// FIXME(eddyb) does this need to be separate from `loc.line` for some reason?
472472
let scope_line = loc.line;
473473

474-
let mut flags = DIFlags::FlagPrototyped | DIFlags::FlagAllCallsDescribed;
474+
let mut flags = DIFlags::FlagPrototyped;
475475

476476
if fn_abi.ret.layout.is_uninhabited() {
477477
flags |= DIFlags::FlagNoReturn;
@@ -494,9 +494,6 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
494494
// LLVM LTO can't unify type definitions when a child DIE is a full subprogram definition.
495495
// When we use this `decl` below, the subprogram definition gets created at the CU level
496496
// with a DW_AT_specification pointing back to the type's declaration.
497-
// FlagAllCallsDescribed cannot appear on the method declaration DIE
498-
// because it has no body, which LLVM's verifier rejects.
499-
let decl_flags = flags & !DIFlags::FlagAllCallsDescribed;
500497
let decl = is_method.then(|| unsafe {
501498
llvm::LLVMRustDIBuilderCreateMethod(
502499
DIB(self),
@@ -508,7 +505,7 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
508505
file_metadata,
509506
loc.line,
510507
function_type_metadata,
511-
decl_flags,
508+
flags,
512509
spflags & !DISPFlags::SPFlagDefinition,
513510
template_parameters,
514511
)

‎compiler/rustc_codegen_llvm/src/llvm/ffi.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,6 @@ pub(crate) mod debuginfo {
781781
const FlagNonTrivial = (1 << 26);
782782
const FlagBigEndian = (1 << 27);
783783
const FlagLittleEndian = (1 << 28);
784-
const FlagAllCallsDescribed = (1 << 29);
785784
}
786785
}
787786

‎compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,6 @@ ASSERT_DIFLAG_VALUE(FlagThunk, 1 << 25);
779779
ASSERT_DIFLAG_VALUE(FlagNonTrivial, 1 << 26);
780780
ASSERT_DIFLAG_VALUE(FlagBigEndian, 1 << 27);
781781
ASSERT_DIFLAG_VALUE(FlagLittleEndian, 1 << 28);
782-
static_assert(DINode::DIFlags::FlagAllCallsDescribed == (1 << 29));
783782
ASSERT_DIFLAG_VALUE(FlagIndirectVirtualBase, (1 << 2) | (1 << 5));
784783
#undef ASSERT_DIFLAG_VALUE
785784

@@ -792,7 +791,7 @@ ASSERT_DIFLAG_VALUE(FlagIndirectVirtualBase, (1 << 2) | (1 << 5));
792791
// to copying each bit/subvalue.
793792
static DINode::DIFlags fromRust(LLVMDIFlags Flags) {
794793
// Check that all set bits are covered by the static assertions above.
795-
const unsigned UNKNOWN_BITS = (1 << 31) | (1 << 30) | (1 << 21);
794+
const unsigned UNKNOWN_BITS = (1 << 31) | (1 << 30) | (1 << 29) | (1 << 21);
796795
if (Flags & UNKNOWN_BITS) {
797796
report_fatal_error("bad LLVMDIFlags");
798797
}

‎tests/codegen-llvm/debuginfo-callsite-flag.rs‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)