Open
Description
We might be spending a non-trivial amount of time creating FnAbi
s and adjusting them, so we should investigate caching them, similar to how we cache LLVM Type
s we compute from Rust Ty
s.
After #65947, this is what's left:
FnAbi::of_instance
: takesty::Instance
, easy to cache- we should be able to make this a query, like
layout_of
is
- we should be able to make this a query, like
FnAbi::of_fn_ptr
: takesty::PolyFnSig
, might be more expensive- well,
inputs_and_outputs
is compared/hashed by pointer nowadays, isn't it? - creating LLVM
Type
s forfn
pointers is already cached itself, but calls offn
pointers also requireFnAbi
s - this is likely used less than
FnAbi::of_instance
, so it's lower priority
- well,