Stream: t-compiler

Topic: Optimizing cg_clif

bjorn3 (Apr 13 2020 at 19:04, on Zulip):

While optimizing cg_clif, I noticed that a lot of time is spent in calls from cg_clif to rustc. Especially layout_of, normalize_erasing_late_bound_regions, subst_and_normalize_erasing_regions and const_caller_location. Any ideas how to improve this?

A profile of the codegen part of the compilation of image can be found at:
The profile can be directly used as input for or can be opened in for example (direct link to open the profile).

bjorn3 (Apr 13 2020 at 19:05, on Zulip):

(Focus on codegen_fn_content)

Jonas Schievink (Apr 13 2020 at 19:06, on Zulip):

There's an issue open for making layout_of a query, which would cache its results

Jonas Schievink (Apr 13 2020 at 19:07, on Zulip):

Ah nevermind, it's already a query

Jonas Schievink (Apr 13 2020 at 19:07, on Zulip):

I was thinking of FnAbi

eddyb (Apr 13 2020 at 19:08, on Zulip):

layouts were never not cached

eddyb (Apr 13 2020 at 19:09, on Zulip):

even long before the query system or non-codegen parts of rustc knowing about layouts

Last update: Jun 04 2020 at 18:45UTC