rust/compiler/rustc_codegen_llvm/src
bors 557359f925 Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk
Prototype: Add unstable `-Z reference-niches` option

MCP: rust-lang/compiler-team#641
Relevant RFC: rust-lang/rfcs#3204

This prototype adds a new `-Z reference-niches` option, controlling the range of valid bit-patterns for reference types (`&T` and `&mut T`), thereby enabling new enum niching opportunities. Like `-Z randomize-layout`, this setting is crate-local; as such, references to built-in types (primitives, tuples, ...) are not affected.

The possible settings are (here, `MAX` denotes the all-1 bit-pattern):
| `-Z reference-niches=` | Valid range |
|:---:|:---:|
| `null` (the default) | `1..=MAX` |
| `size` | `1..=(MAX- size)` |
| `align` | `align..=MAX.align_down_to(align)` |
| `size,align` | `align..=(MAX-size).align_down_to(align)` |

------

This is very WIP, and I'm not sure the approach I've taken here is the best one, but stage 1 tests pass locally; I believe this is in a good enough state to unleash this upon unsuspecting 3rd-party code, and see what breaks.
2023-07-21 15:00:36 +00:00
..
back Auto merge of #112591 - jfgoog:better-dlltool-diagnostics, r=WaffleLapkin 2023-07-19 07:27:50 +00:00
coverageinfo Auto merge of #113430 - Zalathar:hash, r=b-naber 2023-07-16 01:56:23 +00:00
debuginfo refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
llvm Rollup merge of #113780 - dtolnay:printkindpath, r=b-naber 2023-07-21 06:52:28 +02:00
abi.rs Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
allocator.rs Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
asm.rs Rollup merge of #111332 - loongarch-rs:inline-asm, r=Amanieu 2023-05-08 19:41:51 +09:00
attributes.rs Add the no-builtins attribute to functions when no_builtins is applied at the crate level. 2023-07-18 22:15:47 +08:00
base.rs Introduce MonoItemData. 2023-07-17 08:44:48 +10:00
builder.rs Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
callee.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
common.rs Reuse LLVMConstInBoundsGEP2 2023-07-10 00:20:56 -07:00
consts.rs Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
context.rs Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
declare.rs CFI: Fix SIGILL reached via trait objects 2023-05-09 20:04:19 +00:00
errors.rs Better diagnostics for dlltool errors. 2023-07-17 20:20:01 +00:00
intrinsic.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
lib.rs Rollup merge of #113780 - dtolnay:printkindpath, r=b-naber 2023-07-21 06:52:28 +02:00
llvm_util.rs Rollup merge of #113780 - dtolnay:printkindpath, r=b-naber 2023-07-21 06:52:28 +02:00
mono_item.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
type_.rs add wasm eh intrinsics 2023-06-07 17:46:34 +02:00
type_of.rs Don't treat ref. fields with non-null niches as dereferenceable_or_null 2023-07-21 03:31:46 +02:00
va_arg.rs Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00