Skip to content

Commit

Permalink
Fix some rebasing fallout.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Jan 10, 2020
1 parent 11e4844 commit ad65e3e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
1 change: 1 addition & 0 deletions Cargo.lock
Expand Up @@ -3079,6 +3079,7 @@ dependencies = [
"graphviz",
"jobserver",
"log",
"measureme",
"parking_lot",
"polonius-engine",
"rustc-rayon",
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/query/profiling_support.rs
@@ -1,4 +1,3 @@
use crate::hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX, LOCAL_CRATE};
use crate::hir::map::definitions::DefPathData;
use crate::ty::context::TyCtxt;
use crate::ty::query::config::QueryConfig;
Expand All @@ -7,6 +6,7 @@ use measureme::{StringComponent, StringId};
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::profiling::SelfProfiler;
use rustc_data_structures::sharded::Sharded;
use rustc_hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX, LOCAL_CRATE};
use std::fmt::Debug;
use std::io::Write;

Expand Down
12 changes: 2 additions & 10 deletions src/librustc_codegen_ssa/base.rs
Expand Up @@ -334,11 +334,7 @@ pub fn from_immediate<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
bx: &mut Bx,
val: Bx::Value,
) -> Bx::Value {
if bx.cx().val_ty(val) == bx.cx().type_i1() {
bx.zext(val, bx.cx().type_i8())
} else {
val
}
if bx.cx().val_ty(val) == bx.cx().type_i1() { bx.zext(val, bx.cx().type_i8()) } else { val }
}

pub fn to_immediate<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
Expand Down Expand Up @@ -887,11 +883,7 @@ fn determine_cgu_reuse<'tcx>(tcx: TyCtxt<'tcx>, cgu: &CodegenUnit<'tcx>) -> CguR

if tcx.dep_graph.try_mark_green(tcx, &dep_node).is_some() {
// We can re-use either the pre- or the post-thinlto state
if tcx.sess.lto() != Lto::No {
CguReuse::PreLto
} else {
CguReuse::PostLto
}
if tcx.sess.lto() != Lto::No { CguReuse::PreLto } else { CguReuse::PostLto }
} else {
CguReuse::No
}
Expand Down
9 changes: 6 additions & 3 deletions src/librustc_data_structures/profiling.rs
Expand Up @@ -224,7 +224,10 @@ impl SelfProfilerRef {
/// a measureme event, "verbose" generic activities also print a timing entry to
/// stdout if the compiler is invoked with -Ztime or -Ztime-passes.
#[inline(always)]
pub fn verbose_generic_activity<'a>(&'a self, event_id: &'a str) -> VerboseTimingGuard<'a> {
pub fn verbose_generic_activity<'a>(
&'a self,
event_id: &'static str,
) -> VerboseTimingGuard<'a> {
VerboseTimingGuard::start(
event_id,
self.print_verbose_generic_activities,
Expand Down Expand Up @@ -589,8 +592,8 @@ fn get_resident() -> Option<usize> {
cb: DWORD,
) -> BOOL;
}
let mut pmc: PROCESS_MEMORY_COUNTERS = unsafe { mem::zeroed() };
pmc.cb = mem::size_of_val(&pmc) as DWORD;
let mut pmc: PROCESS_MEMORY_COUNTERS = unsafe { std::mem::zeroed() };
pmc.cb = std::mem::size_of_val(&pmc) as DWORD;
match unsafe { GetProcessMemoryInfo(GetCurrentProcess(), &mut pmc, pmc.cb) } {
0 => None,
_ => Some(pmc.WorkingSetSize as usize),
Expand Down

0 comments on commit ad65e3e

Please sign in to comment.