Tune inlining
This commit is contained in:
parent
19170cd217
commit
a8522256c5
|
@ -1122,7 +1122,7 @@ impl CurrentDepGraph {
|
|||
}
|
||||
|
||||
impl DepGraphData {
|
||||
#[inline]
|
||||
#[inline(never)]
|
||||
fn read_index(&self, source: DepNodeIndex) {
|
||||
ty::tls::with_context_opt(|icx| {
|
||||
let icx = if let Some(icx) = icx { icx } else { return };
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
//!
|
||||
//! [mm]: https://github.com/rust-lang/measureme/
|
||||
|
||||
use crate::cold_path;
|
||||
use crate::fx::FxHashMap;
|
||||
|
||||
use std::borrow::Borrow;
|
||||
|
@ -531,9 +532,11 @@ impl<'a> TimingGuard<'a> {
|
|||
#[inline]
|
||||
pub fn finish_with_query_invocation_id(self, query_invocation_id: QueryInvocationId) {
|
||||
if let Some(guard) = self.0 {
|
||||
let event_id = StringId::new_virtual(query_invocation_id.0);
|
||||
let event_id = EventId::from_virtual(event_id);
|
||||
guard.finish_with_override_event_id(event_id);
|
||||
cold_path(|| {
|
||||
let event_id = StringId::new_virtual(query_invocation_id.0);
|
||||
let event_id = EventId::from_virtual(event_id);
|
||||
guard.finish_with_override_event_id(event_id);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ pub trait StableHasherResult: Sized {
|
|||
}
|
||||
|
||||
impl StableHasher {
|
||||
#[inline]
|
||||
pub fn new() -> Self {
|
||||
StableHasher { state: SipHasher128::new_with_keys(0, 0) }
|
||||
}
|
||||
|
|
|
@ -392,6 +392,7 @@ impl Session {
|
|||
);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn source_map(&self) -> &source_map::SourceMap {
|
||||
self.parse_sess.source_map()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue