While optimizing cg_clif, I noticed that a lot of time is spent in calls from cg_clif to rustc. Especially
const_caller_location. Any ideas how to improve this?
A profile of the codegen part of the compilation of
image can be found at: https://gist.github.com/bjorn3/a23351b1ff7077bbbad203a562cb7c1b
The profile can be directly used as input for
flamegraph.pl or can be opened in for example speedscope.app (direct link to open the profile).
There's an issue open for making
layout_of a query, which would cache its results
Ah nevermind, it's already a query
I was thinking of FnAbi https://github.com/rust-lang/rust/issues/65999
layouts were never not cached
even long before the query system or non-codegen parts of rustc knowing about layouts