diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-01-31 18:15:42 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-02-06 13:52:17 +0100 |
| commit | e60ccfc6a9e91a7b26f368c9fee40bd22831450f (patch) | |
| tree | 2e691eb497ddb830a832213d421bbc873474cd20 /compiler/rustc_query_system | |
| parent | e7813fee92c56621d08e8dbe83948d9f4a30a9ec (diff) | |
Don't inline query_cache_hit to reduce code size of the query hot path.
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/query/plumbing.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_query_system/src/query/plumbing.rs b/compiler/rustc_query_system/src/query/plumbing.rs index ffc413d15f5..2fde3c6075b 100644 --- a/compiler/rustc_query_system/src/query/plumbing.rs +++ b/compiler/rustc_query_system/src/query/plumbing.rs @@ -722,7 +722,9 @@ where } Some((_, dep_node_index)) => { dep_graph.read_index(dep_node_index); - qcx.dep_context().profiler().query_cache_hit(dep_node_index.into()); + if std::intrinsics::unlikely(qcx.dep_context().profiler().enabled()) { + qcx.dep_context().profiler().query_cache_hit(dep_node_index.into()); + } (false, None) } } |
