Remove #[macro_use] extern crate tracing
from rustc_codegen_ssa
.
This commit is contained in:
parent
8e94226e61
commit
8ae0694fcb
19 changed files with 24 additions and 8 deletions
|
@ -37,6 +37,7 @@ use rustc_span::{Span, Symbol};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use thin_vec::ThinVec;
|
use thin_vec::ThinVec;
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
pub fn assert_module_sources(tcx: TyCtxt<'_>, set_reuse: &dyn Fn(&mut CguReuseTracker)) {
|
pub fn assert_module_sources(tcx: TyCtxt<'_>, set_reuse: &dyn Fn(&mut CguReuseTracker)) {
|
||||||
|
|
|
@ -52,6 +52,7 @@ use std::ops::Deref;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::process::{ExitStatus, Output, Stdio};
|
use std::process::{ExitStatus, Output, Stdio};
|
||||||
use std::{env, fmt, fs, io, mem, str};
|
use std::{env, fmt, fs, io, mem, str};
|
||||||
|
use tracing::{debug, info, warn};
|
||||||
|
|
||||||
pub fn ensure_removed(dcx: &DiagCtxt, path: &Path) {
|
pub fn ensure_removed(dcx: &DiagCtxt, path: &Path) {
|
||||||
if let Err(e) = fs::remove_file(path) {
|
if let Err(e) = fs::remove_file(path) {
|
||||||
|
|
|
@ -22,6 +22,7 @@ use rustc_session::Session;
|
||||||
use rustc_target::spec::{Cc, LinkOutputKind, LinkerFlavor, Lld};
|
use rustc_target::spec::{Cc, LinkOutputKind, LinkerFlavor, Lld};
|
||||||
|
|
||||||
use cc::windows_registry;
|
use cc::windows_registry;
|
||||||
|
use tracing::{debug, warn};
|
||||||
|
|
||||||
/// Disables non-English messages from localized linkers.
|
/// Disables non-English messages from localized linkers.
|
||||||
/// Such messages may cause issues with text encoding on Windows (#35785)
|
/// Such messages may cause issues with text encoding on Windows (#35785)
|
||||||
|
|
|
@ -3,6 +3,7 @@ use rustc_data_structures::fx::FxHashSet;
|
||||||
use rustc_fs_util::try_canonicalize;
|
use rustc_fs_util::try_canonicalize;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
pub struct RPathConfig<'a> {
|
pub struct RPathConfig<'a> {
|
||||||
pub libs: &'a [&'a Path],
|
pub libs: &'a [&'a Path],
|
||||||
|
|
|
@ -18,6 +18,7 @@ use rustc_middle::ty::{GenericArgKind, GenericArgsRef};
|
||||||
use rustc_middle::util::Providers;
|
use rustc_middle::util::Providers;
|
||||||
use rustc_session::config::{CrateType, OomStrategy};
|
use rustc_session::config::{CrateType, OomStrategy};
|
||||||
use rustc_target::spec::{SanitizerSet, TlsModel};
|
use rustc_target::spec::{SanitizerSet, TlsModel};
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
pub fn threshold(tcx: TyCtxt<'_>) -> SymbolExportLevel {
|
pub fn threshold(tcx: TyCtxt<'_>) -> SymbolExportLevel {
|
||||||
crates_export_threshold(tcx.crate_types())
|
crates_export_threshold(tcx.crate_types())
|
||||||
|
|
|
@ -49,6 +49,7 @@ use std::str;
|
||||||
use std::sync::mpsc::{channel, Receiver, Sender};
|
use std::sync::mpsc::{channel, Receiver, Sender};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
const PRE_LTO_BC_EXT: &str = "pre-lto.bc";
|
const PRE_LTO_BC_EXT: &str = "pre-lto.bc";
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ use std::collections::BTreeSet;
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
|
use tracing::{debug, info};
|
||||||
|
|
||||||
pub fn bin_op_to_icmp_predicate(op: BinOp, signed: bool) -> IntPredicate {
|
pub fn bin_op_to_icmp_predicate(op: BinOp, signed: bool) -> IntPredicate {
|
||||||
match op {
|
match op {
|
||||||
|
|
|
@ -15,9 +15,6 @@
|
||||||
//! The backend-agnostic functions of this crate use functions defined in various traits that
|
//! The backend-agnostic functions of this crate use functions defined in various traits that
|
||||||
//! have to be implemented by each backend.
|
//! have to be implemented by each backend.
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate tracing;
|
|
||||||
|
|
||||||
use rustc_ast as ast;
|
use rustc_ast as ast;
|
||||||
use rustc_data_structures::fx::FxHashSet;
|
use rustc_data_structures::fx::FxHashSet;
|
||||||
use rustc_data_structures::fx::FxIndexMap;
|
use rustc_data_structures::fx::FxIndexMap;
|
||||||
|
|
|
@ -5,6 +5,7 @@ use rustc_middle::ty::{self, GenericArgKind, Ty};
|
||||||
use rustc_session::config::Lto;
|
use rustc_session::config::Lto;
|
||||||
use rustc_symbol_mangling::typeid_for_trait_ref;
|
use rustc_symbol_mangling::typeid_for_trait_ref;
|
||||||
use rustc_target::abi::call::FnAbi;
|
use rustc_target::abi::call::FnAbi;
|
||||||
|
use tracing::{debug, instrument};
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
pub struct VirtualIndex(u64);
|
pub struct VirtualIndex(u64);
|
||||||
|
|
|
@ -11,6 +11,7 @@ use rustc_middle::mir::visit::{MutatingUseContext, NonMutatingUseContext, PlaceC
|
||||||
use rustc_middle::mir::{self, DefLocation, Location, TerminatorKind};
|
use rustc_middle::mir::{self, DefLocation, Location, TerminatorKind};
|
||||||
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
|
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
|
||||||
use rustc_middle::{bug, span_bug};
|
use rustc_middle::{bug, span_bug};
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
pub fn non_ssa_locals<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
pub fn non_ssa_locals<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
||||||
fx: &FunctionCx<'a, 'tcx, Bx>,
|
fx: &FunctionCx<'a, 'tcx, Bx>,
|
||||||
|
|
|
@ -24,6 +24,7 @@ use rustc_span::{source_map::Spanned, sym, Span};
|
||||||
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode, Reg};
|
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode, Reg};
|
||||||
use rustc_target::abi::{self, HasDataLayout, WrappingRange};
|
use rustc_target::abi::{self, HasDataLayout, WrappingRange};
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
|
use tracing::{debug, info};
|
||||||
|
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@ use rustc_index::IndexVec;
|
||||||
use rustc_middle::mir;
|
use rustc_middle::mir;
|
||||||
use rustc_middle::ty::print::with_no_trimmed_paths;
|
use rustc_middle::ty::print::with_no_trimmed_paths;
|
||||||
use std::ops::{Index, IndexMut};
|
use std::ops::{Index, IndexMut};
|
||||||
|
use tracing::{debug, warn};
|
||||||
|
|
||||||
pub(super) struct Locals<'tcx, V> {
|
pub(super) struct Locals<'tcx, V> {
|
||||||
values: IndexVec<mir::Local, LocalRef<'tcx, V>>,
|
values: IndexVec<mir::Local, LocalRef<'tcx, V>>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt, TyAndLayout};
|
||||||
use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable, TypeVisitableExt};
|
use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable, TypeVisitableExt};
|
||||||
use rustc_middle::{bug, span_bug};
|
use rustc_middle::{bug, span_bug};
|
||||||
use rustc_target::abi::call::{FnAbi, PassMode};
|
use rustc_target::abi::call::{FnAbi, PassMode};
|
||||||
|
use tracing::{debug, instrument};
|
||||||
|
|
||||||
use std::iter;
|
use std::iter;
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ use std::fmt;
|
||||||
|
|
||||||
use arrayvec::ArrayVec;
|
use arrayvec::ArrayVec;
|
||||||
use either::Either;
|
use either::Either;
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
/// The representation of a Rust value. The enum variant is in fact
|
/// The representation of a Rust value. The enum variant is in fact
|
||||||
/// uniquely determined by the value's type, but is kept as a
|
/// uniquely determined by the value's type, but is kept as a
|
||||||
|
|
|
@ -12,6 +12,7 @@ use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf, TyAndLayout};
|
||||||
use rustc_middle::ty::{self, Ty};
|
use rustc_middle::ty::{self, Ty};
|
||||||
use rustc_target::abi::{Align, FieldsShape, Int, Pointer, Size, TagEncoding};
|
use rustc_target::abi::{Align, FieldsShape, Int, Pointer, Size, TagEncoding};
|
||||||
use rustc_target::abi::{VariantIdx, Variants};
|
use rustc_target::abi::{VariantIdx, Variants};
|
||||||
|
use tracing::{debug, instrument};
|
||||||
|
|
||||||
/// The location and extra runtime properties of the place.
|
/// The location and extra runtime properties of the place.
|
||||||
///
|
///
|
||||||
|
@ -159,9 +160,9 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
|
||||||
bx.inbounds_ptradd(self.val.llval, bx.const_usize(offset.bytes()))
|
bx.inbounds_ptradd(self.val.llval, bx.const_usize(offset.bytes()))
|
||||||
};
|
};
|
||||||
let val = PlaceValue {
|
let val = PlaceValue {
|
||||||
llval,
|
llval,
|
||||||
llextra: if bx.cx().type_has_metadata(field.ty) { self.val.llextra } else { None },
|
llextra: if bx.cx().type_has_metadata(field.ty) { self.val.llextra } else { None },
|
||||||
align: effective_field_align,
|
align: effective_field_align,
|
||||||
};
|
};
|
||||||
val.with_type(field)
|
val.with_type(field)
|
||||||
};
|
};
|
||||||
|
@ -408,9 +409,9 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
|
||||||
};
|
};
|
||||||
|
|
||||||
let llval = bx.inbounds_gep(
|
let llval = bx.inbounds_gep(
|
||||||
bx.cx().backend_type(self.layout),
|
bx.cx().backend_type(self.layout),
|
||||||
self.val.llval,
|
self.val.llval,
|
||||||
&[bx.cx().const_usize(0), llindex],
|
&[bx.cx().const_usize(0), llindex],
|
||||||
);
|
);
|
||||||
let align = self.val.align.restrict_for_offset(offset);
|
let align = self.val.align.restrict_for_offset(offset);
|
||||||
PlaceValue::new_sized(llval, align).with_type(layout)
|
PlaceValue::new_sized(llval, align).with_type(layout)
|
||||||
|
|
|
@ -17,6 +17,7 @@ use rustc_span::{Span, DUMMY_SP};
|
||||||
use rustc_target::abi::{self, FieldIdx, FIRST_VARIANT};
|
use rustc_target::abi::{self, FieldIdx, FIRST_VARIANT};
|
||||||
|
|
||||||
use arrayvec::ArrayVec;
|
use arrayvec::ArrayVec;
|
||||||
|
use tracing::{debug, instrument};
|
||||||
|
|
||||||
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
||||||
#[instrument(level = "trace", skip(self, bx))]
|
#[instrument(level = "trace", skip(self, bx))]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use rustc_middle::mir::{self, NonDivergingIntrinsic};
|
use rustc_middle::mir::{self, NonDivergingIntrinsic};
|
||||||
use rustc_middle::span_bug;
|
use rustc_middle::span_bug;
|
||||||
use rustc_session::config::OptLevel;
|
use rustc_session::config::OptLevel;
|
||||||
|
use tracing::instrument;
|
||||||
|
|
||||||
use super::FunctionCx;
|
use super::FunctionCx;
|
||||||
use super::LocalRef;
|
use super::LocalRef;
|
||||||
|
|
|
@ -9,6 +9,7 @@ use rustc_middle::span_bug;
|
||||||
use rustc_middle::ty;
|
use rustc_middle::ty;
|
||||||
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
|
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
|
||||||
use rustc_middle::ty::Instance;
|
use rustc_middle::ty::Instance;
|
||||||
|
use tracing::debug;
|
||||||
|
|
||||||
pub trait MonoItemExt<'a, 'tcx> {
|
pub trait MonoItemExt<'a, 'tcx> {
|
||||||
fn define<Bx: BuilderMethods<'a, 'tcx>>(&self, cx: &'a Bx::CodegenCx);
|
fn define<Bx: BuilderMethods<'a, 'tcx>>(&self, cx: &'a Bx::CodegenCx);
|
||||||
|
|
|
@ -9,6 +9,7 @@ use rustc_middle::bug;
|
||||||
use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths};
|
use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths};
|
||||||
use rustc_middle::ty::{self, Ty};
|
use rustc_middle::ty::{self, Ty};
|
||||||
use rustc_target::abi::WrappingRange;
|
use rustc_target::abi::WrappingRange;
|
||||||
|
use tracing::{debug, trace};
|
||||||
|
|
||||||
pub fn size_and_align_of_dst<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
pub fn size_and_align_of_dst<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
||||||
bx: &mut Bx,
|
bx: &mut Bx,
|
||||||
|
|
Loading…
Add table
Reference in a new issue