rust/compiler/rustc_codegen_ssa/src
Matthias Krüger 644f06ec1f
Rollup merge of #141569 - workingjubilee:canonicalize-abi, r=bjorn3
Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi`

Our `conv_from_spec_abi`, `adjust_abi`, and `is_abi_supported` combine to give us a very confusing way of reasoning about what _actual_ calling convention we want to lower our code to and whether we want to compile the resulting code at all. Instead of leaving this code as a miniature adventure game in which someone tries to combine stateful mutations into a Rube Goldberg machine that will let them escape the maze and arrive at the promised land of codegen, we let `AbiMap` devour this complexity. Once you have an `AbiMap`, you can answer which `ExternAbi`s will lower to what `CanonAbi`s (and whether they will lower at all).

Removed:
- `conv_from_spec_abi` replaced by `AbiMap::canonize_abi`
- `adjust_abi` replaced by same
- `Conv::PreserveAll` as unused
- `Conv::Cold` as unused
- `enum Conv` replaced by `enum CanonAbi`

target-spec.json changes:
- If you have a target-spec.json then now your "entry-abi" key will be specified in terms of one of the `"{abi}"` strings Rust recognizes, e.g.
```json
    "entry-abi": "C",
    "entry-abi": "win64",
    "entry-abi": "aapcs",
```
2025-06-03 21:53:36 +02:00
..
back Rollup merge of #141569 - workingjubilee:canonicalize-abi, r=bjorn3 2025-06-03 21:53:36 +02:00
debuginfo Flatten ifs in rustc_codegen_ssa 2025-03-17 18:56:52 +00:00
mir Directly use from_immediate for handling bool 2025-05-30 10:12:57 +00:00
traits Remove type_test from IntrinsicCallBuilderMethods 2025-06-03 10:00:56 +00:00
assert_module_sources.rs Move methods from Map to TyCtxt, part 4. 2025-03-12 08:55:37 +11:00
base.rs Remove codegen_unit from MiscCodegenMethods 2025-05-28 20:55:00 +00:00
codegen_attrs.rs Cleanup CodegenFnAttrFlags 2025-05-24 20:31:37 +02:00
common.rs get rid of rustc_codegen_ssa::common::AtomicOrdering 2025-05-28 22:57:55 +02:00
errors.rs make enabling the neon target feature a FCW 2025-05-22 12:19:25 +02:00
lib.rs Revert "Fix linking statics on Arm64EC #140176" 2025-05-15 16:54:27 +08:00
meth.rs Rename unpack to kind 2025-05-27 11:14:45 +00:00
mono_item.rs Make predefine methods take &mut self 2025-05-28 20:55:00 +00:00
size_of_val.rs Set both nuw and nsw in slice size calculation 2025-02-13 21:26:48 -08:00
target_features.rs make enabling the neon target feature a FCW 2025-05-22 12:19:25 +02:00