mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
Remove #[macro_use] extern crate tracing
from rustc_mir_transform
.
This commit is contained in:
parent
0d634185df
commit
ed5161c5ac
@ -1,6 +1,7 @@
|
||||
use rustc_index::{Idx, IndexVec};
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use tracing::debug;
|
||||
|
||||
#[derive(PartialEq)]
|
||||
pub enum AddCallGuards {
|
||||
|
@ -1,6 +1,7 @@
|
||||
use rustc_middle::mir::patch::MirPatch;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::util;
|
||||
|
||||
|
@ -5,6 +5,7 @@ use rustc_middle::mir::visit::{MutatingUseContext, NonMutatingUseContext, PlaceC
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::{self, ParamEnv, Ty, TyCtxt};
|
||||
use rustc_session::Session;
|
||||
use tracing::{debug, trace};
|
||||
|
||||
pub struct CheckAlignment;
|
||||
|
||||
|
@ -3,6 +3,7 @@ use rustc_index::IndexSlice;
|
||||
use rustc_middle::mir::visit::*;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use crate::ssa::SsaLocals;
|
||||
|
||||
|
@ -78,6 +78,7 @@ use rustc_target::spec::PanicStrategy;
|
||||
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
|
||||
use rustc_trait_selection::infer::TyCtxtInferExt as _;
|
||||
use rustc_trait_selection::traits::{ObligationCause, ObligationCauseCode, ObligationCtxt};
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
use crate::deref_separator::deref_finder;
|
||||
use crate::{abort_unwinding_calls, errors, pass_manager as pm, simplify};
|
||||
|
@ -6,6 +6,7 @@ use rustc_data_structures::graph::DirectedGraph;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::coverage::{CounterId, CovTerm, Expression, ExpressionId, Op};
|
||||
use tracing::{debug, debug_span, instrument};
|
||||
|
||||
use crate::coverage::graph::{BasicCoverageBlock, CoverageGraph, TraverseCoverageGraphWithLoops};
|
||||
|
||||
|
@ -10,6 +10,7 @@ use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::{self, BasicBlock, Terminator, TerminatorKind};
|
||||
use tracing::debug;
|
||||
|
||||
/// A coverage-specific simplification of the MIR control flow graph (CFG). The `CoverageGraph`s
|
||||
/// nodes are `BasicCoverageBlock`s, which encompass one or more MIR `BasicBlock`s.
|
||||
|
@ -23,6 +23,7 @@ use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::{BytePos, Pos, RelativeBytePos, Span, Symbol};
|
||||
use tracing::{debug, debug_span, instrument, trace};
|
||||
|
||||
use crate::coverage::counters::{CounterIncrementSite, CoverageCounters};
|
||||
use crate::coverage::graph::CoverageGraph;
|
||||
|
@ -7,6 +7,7 @@ use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_middle::util::Providers;
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::sym;
|
||||
use tracing::trace;
|
||||
|
||||
/// Registers query/hook implementations related to coverage.
|
||||
pub(crate) fn provide(providers: &mut Providers) {
|
||||
|
@ -4,6 +4,7 @@ use rustc_data_structures::captures::Captures;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_middle::mir;
|
||||
use rustc_span::Span;
|
||||
use tracing::{debug, debug_span, instrument};
|
||||
|
||||
use crate::coverage::graph::{BasicCoverageBlock, CoverageGraph};
|
||||
use crate::coverage::spans::from_mir::{
|
||||
|
@ -6,6 +6,7 @@ use rustc_middle::mir::{
|
||||
BasicBlock, BasicBlockData, Body, Statement, StatementKind, TerminatorKind,
|
||||
};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::MirPass;
|
||||
|
||||
|
@ -19,6 +19,7 @@ use rustc_mir_dataflow::value_analysis::{
|
||||
use rustc_mir_dataflow::{Analysis, Results, ResultsVisitor};
|
||||
use rustc_span::DUMMY_SP;
|
||||
use rustc_target::abi::{Abi, FieldIdx, Size, VariantIdx, FIRST_VARIANT};
|
||||
use tracing::{debug, debug_span, instrument};
|
||||
|
||||
// These constants are somewhat random guesses and have not been optimized.
|
||||
// If `tcx.sess.mir_opt_level() >= 4`, we ignore the limits (this can become very expensive).
|
||||
|
@ -9,6 +9,7 @@ use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_middle::mir::visit::MutVisitor;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use tracing::debug;
|
||||
|
||||
use super::simplify::simplify_cfg;
|
||||
|
||||
|
@ -144,6 +144,7 @@ use rustc_middle::ty::TyCtxt;
|
||||
use rustc_mir_dataflow::impls::MaybeLiveLocals;
|
||||
use rustc_mir_dataflow::points::{save_as_intervals, DenseLocationMap, PointIndex};
|
||||
use rustc_mir_dataflow::Analysis;
|
||||
use tracing::{debug, trace};
|
||||
|
||||
use crate::MirPass;
|
||||
|
||||
|
@ -3,6 +3,7 @@ use std::fmt::Debug;
|
||||
use rustc_middle::mir::patch::MirPatch;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::{Ty, TyCtxt};
|
||||
use tracing::trace;
|
||||
|
||||
use super::simplify::simplify_cfg;
|
||||
|
||||
|
@ -15,6 +15,7 @@ use rustc_mir_dataflow::{
|
||||
};
|
||||
use rustc_span::Span;
|
||||
use rustc_target::abi::{FieldIdx, VariantIdx};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use crate::deref_separator::deref_finder;
|
||||
|
||||
|
@ -6,6 +6,7 @@ use rustc_middle::{bug, span_bug};
|
||||
use rustc_session::lint::builtin::FFI_UNWIND_CALLS;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::errors;
|
||||
|
||||
|
@ -105,6 +105,7 @@ use rustc_span::def_id::DefId;
|
||||
use rustc_span::DUMMY_SP;
|
||||
use rustc_target::abi::{self, Abi, FieldIdx, Size, VariantIdx, FIRST_VARIANT};
|
||||
use smallvec::SmallVec;
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
use crate::ssa::{AssignedValue, SsaLocals};
|
||||
|
||||
|
@ -20,6 +20,7 @@ use rustc_span::source_map::Spanned;
|
||||
use rustc_span::sym;
|
||||
use rustc_target::abi::FieldIdx;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use tracing::{debug, instrument, trace, trace_span};
|
||||
|
||||
use crate::cost_checker::CostChecker;
|
||||
use crate::deref_separator::deref_finder;
|
||||
|
@ -5,6 +5,7 @@ use rustc_middle::mir::TerminatorKind;
|
||||
use rustc_middle::ty::{self, GenericArgsRef, InstanceKind, TyCtxt, TypeVisitableExt};
|
||||
use rustc_session::Limit;
|
||||
use rustc_span::sym;
|
||||
use tracing::{instrument, trace};
|
||||
|
||||
// FIXME: check whether it is cheaper to precompute the entire call graph instead of invoking
|
||||
// this query ridiculously often.
|
||||
|
@ -51,6 +51,7 @@ use rustc_mir_dataflow::lattice::HasBottom;
|
||||
use rustc_mir_dataflow::value_analysis::{Map, PlaceIndex, State, TrackElem};
|
||||
use rustc_span::DUMMY_SP;
|
||||
use rustc_target::abi::{TagEncoding, Variants};
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
use crate::cost_checker::CostChecker;
|
||||
|
||||
|
@ -22,6 +22,7 @@ use rustc_middle::ty::layout::{LayoutError, LayoutOf, LayoutOfHelpers, TyAndLayo
|
||||
use rustc_middle::ty::{self, ConstInt, ParamEnv, ScalarInt, Ty, TyCtxt, TypeVisitableExt};
|
||||
use rustc_span::Span;
|
||||
use rustc_target::abi::{Abi, FieldIdx, HasDataLayout, Size, TargetDataLayout, VariantIdx};
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
use crate::errors::{AssertLint, AssertLintKind};
|
||||
use crate::MirLint;
|
||||
|
@ -15,9 +15,6 @@
|
||||
#![feature(yeet_expr)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
use hir::ConstContext;
|
||||
use required_consts::RequiredConstsVisitor;
|
||||
use rustc_const_eval::util;
|
||||
@ -39,6 +36,7 @@ use rustc_middle::{bug, query, span_bug};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{sym, DUMMY_SP};
|
||||
use rustc_trait_selection::traits;
|
||||
use tracing::{debug, trace};
|
||||
|
||||
#[macro_use]
|
||||
mod pass_manager;
|
||||
|
@ -6,6 +6,7 @@ use rustc_middle::bug;
|
||||
use rustc_middle::mir::visit::{MutVisitor, NonUseContext, PlaceContext, Visitor};
|
||||
use rustc_middle::mir::{self, BasicBlock, Local, Location};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use tracing::{debug, trace};
|
||||
|
||||
use crate::MirPass;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
use rustc_middle::mir::{self, Body, MirPhase, RuntimePhase};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::Session;
|
||||
use tracing::trace;
|
||||
|
||||
use crate::lint::lint_body;
|
||||
use crate::{validate, MirPass};
|
||||
|
@ -27,6 +27,7 @@ use rustc_middle::ty::{self, GenericArgs, List, Ty, TyCtxt, TypeVisitableExt};
|
||||
use rustc_middle::{bug, mir, span_bug};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::Span;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
/// A `MirPass` for promotion.
|
||||
///
|
||||
|
@ -10,6 +10,7 @@ use rustc_middle::ty::TyCtxt;
|
||||
use rustc_mir_dataflow::impls::MaybeStorageDead;
|
||||
use rustc_mir_dataflow::storage::always_storage_live_locals;
|
||||
use rustc_mir_dataflow::Analysis;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use crate::ssa::{SsaLocals, StorageLiveLocals};
|
||||
|
||||
|
@ -3,6 +3,7 @@ use rustc_middle::mir::patch::MirPatch;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
use tracing::debug;
|
||||
|
||||
/// A pass that removes noop landing pads and replaces jumps to them with
|
||||
/// `UnwindAction::Continue`. This is important because otherwise LLVM generates
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use tracing::trace;
|
||||
|
||||
pub struct RemovePlaceMention;
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use tracing::trace;
|
||||
|
||||
pub struct RemoveStorageMarkers;
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use tracing::{debug, trace};
|
||||
|
||||
use super::simplify::simplify_cfg;
|
||||
|
||||
|
@ -17,6 +17,7 @@ use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use rustc_target::abi::{FieldIdx, VariantIdx, FIRST_VARIANT};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use crate::{
|
||||
abort_unwinding_calls, add_call_guards, add_moves_for_packed_drops, deref_separator,
|
||||
|
@ -19,6 +19,7 @@ use rustc_span::source_map::respan;
|
||||
use rustc_span::{Span, Symbol};
|
||||
use rustc_target::abi::{FieldIdx, VariantIdx};
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
use tracing::debug;
|
||||
|
||||
use super::{local_decls_for_sig, new_body};
|
||||
|
||||
|
@ -33,6 +33,7 @@ use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::DUMMY_SP;
|
||||
use smallvec::SmallVec;
|
||||
use tracing::{debug, trace};
|
||||
|
||||
pub enum SimplifyCfg {
|
||||
Initial,
|
||||
|
@ -1,5 +1,6 @@
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use tracing::trace;
|
||||
|
||||
pub enum SimplifyConstCondition {
|
||||
AfterConstProp,
|
||||
|
@ -7,6 +7,7 @@ use rustc_middle::mir::{
|
||||
TerminatorKind,
|
||||
};
|
||||
use rustc_middle::ty::{Ty, TyCtxt};
|
||||
use tracing::trace;
|
||||
|
||||
use super::MirPass;
|
||||
|
||||
|
@ -9,6 +9,7 @@ use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_mir_dataflow::value_analysis::{excluded_locals, iter_fields};
|
||||
use rustc_target::abi::{FieldIdx, FIRST_VARIANT};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
pub struct ScalarReplacementOfAggregates;
|
||||
|
||||
|
@ -14,6 +14,7 @@ use rustc_middle::middle::resolve_bound_vars::Set1;
|
||||
use rustc_middle::mir::visit::*;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::{ParamEnv, TyCtxt};
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
pub struct SsaLocals {
|
||||
/// Assignments to each local. This defines whether the local is SSA.
|
||||
|
@ -10,6 +10,7 @@ use rustc_middle::mir::{
|
||||
use rustc_middle::ty::layout::TyAndLayout;
|
||||
use rustc_middle::ty::{Ty, TyCtxt};
|
||||
use rustc_target::abi::{Abi, Variants};
|
||||
use tracing::trace;
|
||||
|
||||
use crate::MirPass;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user