rust/compiler/rustc_codegen_ssa/src
bors 91198820d7 Auto merge of #88575 - eddyb:fn-abi-queries, r=nagisa
Querify `FnAbi::of_{fn_ptr,instance}` as `fn_abi_of_{fn_ptr,instance}`.

*Note: opening this PR as draft because it's based on #88499*

This more or less replicates the `LayoutOf::layout_of` setup from #88499, to replace `FnAbi::of_{fn_ptr,instance}` with `FnAbiOf::fn_abi_of_{fn_ptr,instance}`, and also route them through queries (which `layout_of` has used for a while).

The two changes at the use sites (other than the names) are:
* return type is now wrapped in `&'tcx`
  * the value *is* interned, which may affect performance
* the `extra_args` list is now an interned `&'tcx ty::List<Ty<'tcx>>`
  * should be cheap (it's empty for anything other than C variadics)

Theoretically, a `FnAbiOfHelpers` implementer could choose to keep the `Result<...>` instead of eagerly erroring, but the only existing users of these APIs are codegen backends, so they don't (want to) take advantage of this.
At least miri could make use of this, since it prefers propagating errors (it "just" doesn't use `FnAbi` yet - cc `@RalfJung).`

The way this is done is probably less efficient than what is possible, because the queries handle the correctness-oriented API (i.e. the split into `fn` pointers vs instances), whereas a lower-level query could end up with more reuse between different instances with identical signatures.

r? `@nagisa` cc `@oli-obk` `@bjorn3`
2021-09-19 21:39:47 +00:00
..
back Move get_tools_search_paths from FileSearch to Session 2021-09-08 18:25:47 +02:00
coverageinfo Reland - Report coverage 0 of dead blocks 2021-06-01 13:28:59 -07:00
debuginfo Make abi::Abi Copy and remove a *lot* of refs 2021-09-09 10:41:19 +02:00
mir Auto merge of #88575 - eddyb:fn-abi-queries, r=nagisa 2021-09-19 21:39:47 +00:00
traits ty::layout: replicate layout_of setup for fn_abi_of_{fn_ptr,instance}. 2021-09-18 04:41:29 +03:00
base.rs Auto merge of #88499 - eddyb:layout-off, r=nagisa 2021-09-05 16:14:41 +00:00
common.rs Remove support for floating-point constants in asm! 2021-05-14 14:58:21 +01:00
glue.rs Refactor to make interpreter and codegen backend neutral to vtable internal representation. 2021-06-15 01:59:00 +08:00
lib.rs Fix handling of +whole-archive native link modifier. 2021-08-30 11:49:49 +02:00
meth.rs Prepare inbounds_gep for opaque pointers 2021-08-04 15:51:30 +02:00
mono_item.rs rustc_target: move LayoutOf to ty::layout. 2021-09-02 01:17:14 +03:00
target_features.rs Remove crypto composite feature from allowed aarch64 features. 2021-08-03 12:07:56 +00:00