Closed
Description
It is very common to clutter libraries with #[inline]
annotations on small/trivial functions to ensure that they optimize well. It shouldn't really be necessary to do this by hand so often. Instead, the compiler could use its inlining heuristic (which already exists for the MIR inliner) to decide when it is likely to be beneficial to make a function inlineable.
This was previously attempted in #70550
Metadata
Metadata
Assignees
Labels
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: MIR inliningCategory: An issue proposing an enhancement or a PR with one.Issue: Problems and improvements with respect to performance of generated code.Relevant to the compiler team, which will review and decide on the PR/issue.