From cc9c57678cba5f23a1d6bfacbc64f88cef2c397b Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 11 Jul 2023 15:22:09 +1000 Subject: [PATCH 1/2] Fix LLVM thread names on Windows. PR #112946 tweaked the naming of LLVM threads, but messed things up slightly, resulting in threads on Windows having names like `optimize module {} regex.f10ba03eb5ec7975-cgu.0`. This commit removes the extraneous `{} `. --- compiler/rustc_codegen_ssa/src/back/write.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index ececa29b23155..afe6fe4071f39 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -742,9 +742,9 @@ impl WorkItem { } match self { - WorkItem::Optimize(m) => desc("opt", "optimize module {}", &m.name), - WorkItem::CopyPostLtoArtifacts(m) => desc("cpy", "copy LTO artifacts for {}", &m.name), - WorkItem::LTO(m) => desc("lto", "LTO module {}", m.name()), + WorkItem::Optimize(m) => desc("opt", "optimize module", &m.name), + WorkItem::CopyPostLtoArtifacts(m) => desc("cpy", "copy LTO artifacts for", &m.name), + WorkItem::LTO(m) => desc("lto", "LTO module", m.name()), } } } From 1748fd64f29e6d30ac6b8c3009cb37d8a0c2aa95 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 17 Jul 2023 08:43:24 +1000 Subject: [PATCH 2/2] Remove unused `PerLocalVarDebugInfo::fragments` field. --- compiler/rustc_codegen_ssa/src/mir/debuginfo.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs index 34b8d8b5a6f02..f0b04d4fa6de0 100644 --- a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs +++ b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs @@ -15,8 +15,6 @@ use super::operand::{OperandRef, OperandValue}; use super::place::PlaceRef; use super::{FunctionCx, LocalRef}; -use std::ops::Range; - pub struct FunctionDebugContext { pub scopes: IndexVec>, } @@ -36,10 +34,6 @@ pub struct PerLocalVarDebugInfo<'tcx, D> { /// `DIVariable` returned by `create_dbg_var`. pub dbg_var: Option, - /// Byte range in the `dbg_var` covered by this fragment, - /// if this is a fragment of a composite `VarDebugInfo`. - pub fragment: Option>, - /// `.place.projection` from `mir::VarDebugInfo`. pub projection: &'tcx ty::List>, @@ -321,7 +315,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { name, source_info: decl.source_info, dbg_var, - fragment: None, projection: ty::List::empty(), references: 0, }) @@ -545,7 +538,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { name: var.name, source_info: var.source_info, dbg_var, - fragment: None, projection: place.projection, references: var.references, }); @@ -593,13 +585,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { name: var.name, source_info: var.source_info, dbg_var, - fragment: if fragment_layout.size == var_layout.size { - // Fragment covers entire variable, so as far as - // DWARF is concerned, it's not really a fragment. - None - } else { - Some(fragment_start..fragment_start + fragment_layout.size) - }, projection: place.projection, references: var.references, });