diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-10-03 12:43:43 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-10-03 12:43:43 -0400 |
| commit | 1c2ad79f9d789b0d449a1bc4dfe7d7ddc2ed4109 (patch) | |
| tree | 9ee71c9d3fb86b5f857aabec39cf77560245d114 /compiler/rustc_infer/src/infer | |
| parent | 2801a770ce3a21a53769180d9815240ac555cbef (diff) | |
| download | rust-1c2ad79f9d789b0d449a1bc4dfe7d7ddc2ed4109.tar.gz rust-1c2ad79f9d789b0d449a1bc4dfe7d7ddc2ed4109.zip | |
Add two inline annotations for hot functions
These two functions are essentially no-ops (and compile to just a load and return), but show up in process_obligations profiles with a high call count -- so worthwhile to try and inline them away.
Diffstat (limited to 'compiler/rustc_infer/src/infer')
| -rw-r--r-- | compiler/rustc_infer/src/infer/type_variable.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_infer/src/infer/type_variable.rs b/compiler/rustc_infer/src/infer/type_variable.rs index 0e832685310..82970f214fa 100644 --- a/compiler/rustc_infer/src/infer/type_variable.rs +++ b/compiler/rustc_infer/src/infer/type_variable.rs @@ -400,6 +400,7 @@ pub(crate) struct TyVidEqKey<'tcx> { } impl<'tcx> From<ty::TyVid> for TyVidEqKey<'tcx> { + #[inline] // make this function eligible for inlining - it is quite hot. fn from(vid: ty::TyVid) -> Self { TyVidEqKey { vid, phantom: PhantomData } } |
