rust/compiler/rustc_codegen_ssa/src/mir
许杰友 Jieyou Xu (Joe) 2d3b1e014b
Rollup merge of #124251 - scottmcm:unop-ptr-metadata, r=oli-obk
Add an intrinsic for `ptr::metadata`

The follow-up to #123840, so we can remove `PtrComponents` and `PtrRepr` from libcore entirely (well, after a bootstrap update).

As discussed in <https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/.60ptr_metadata.60.20in.20MIR/near/435637808>, this introduces `UnOp::PtrMetadata` taking a raw pointer and returning the associated metadata value.

By no longer going through a `union`, this should also help future PRs better optimize pointer operations.

r? ``@oli-obk``
2024-05-29 03:25:07 +01:00
..
analyze.rs Remove #[macro_use] extern crate tracing from rustc_codegen_ssa. 2024-05-23 18:02:40 +10:00
block.rs Omit non-needs_drop drop_in_place in vtables 2024-05-27 16:26:56 -04:00
constant.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
coverageinfo.rs Unbox and unwrap the contents of StatementKind::Coverage 2024-03-23 22:05:11 +11:00
debuginfo.rs Make builtin_deref just return a Ty 2024-05-09 22:55:00 -04:00
intrinsic.rs Refactoring after the PlaceValue addition 2024-05-10 20:09:37 -07:00
locals.rs Remove #[macro_use] extern crate tracing from rustc_codegen_ssa. 2024-05-23 18:02:40 +10:00
mod.rs Remove #[macro_use] extern crate tracing from rustc_codegen_ssa. 2024-05-23 18:02:40 +10:00
operand.rs Add an intrinsic for ptr::metadata 2024-05-28 09:28:51 -07:00
place.rs Add an intrinsic for ptr::metadata 2024-05-28 09:28:51 -07:00
rvalue.rs Add an intrinsic for ptr::metadata 2024-05-28 09:28:51 -07:00
statement.rs Remove #[macro_use] extern crate tracing from rustc_codegen_ssa. 2024-05-23 18:02:40 +10:00