rust/compiler/rustc_codegen_llvm/src
bors 1e978a3627 Auto merge of #96946 - WaffleLapkin:ptr_mask, r=scottmcm
Add pointer masking convenience functions

This PR adds the following public API:
```rust
impl<T: ?Sized> *const T {
    fn mask(self, mask: usize) -> *const T;
}

impl<T: ?Sized> *mut T {
    fn mask(self, mask: usize) -> *const T;
}

// mod intrinsics
fn mask<T>(ptr: *const T, mask: usize) -> *const T
```
This is equivalent to `ptr.map_addr(|a| a & mask)` but also uses a cool llvm intrinsic.

Proposed in https://github.com/rust-lang/rust/pull/95643#issuecomment-1121562352

cc `@Gankra` `@scottmcm` `@RalfJung`

r? rust-lang/libs-api
2022-08-28 01:34:47 +00:00
..
back Implementation of import_name_type 2022-08-26 09:15:35 -07:00
coverageinfo add #[rustc_pass_by_value] to more types 2022-03-08 15:39:52 +01:00
debuginfo [debuginfo] Use IndexMap instead of FxHashMap while generating cpp-like generator debuginfo. 2022-08-12 10:53:08 +02:00
llvm Rollup merge of #100460 - cuviper:drop-llvm-12, r=nagisa 2022-08-16 06:05:57 +02:00
abi.rs Move ArgAbi::pad_i32 into PassMode::Cast. 2022-08-26 11:12:36 +10:00
allocator.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
asm.rs Update the minimum external LLVM to 13 2022-08-14 13:46:51 -07:00
attributes.rs codegen: use new {re,de,}allocator annotations in llvm 2022-07-26 09:43:28 -04:00
base.rs Auto merge of #95689 - lqd:self-profiler, r=wesleywiser 2022-04-16 11:43:28 +00:00
builder.rs Update the minimum external LLVM to 13 2022-08-14 13:46:51 -07:00
callee.rs Implementation of import_name_type 2022-08-26 09:15:35 -07:00
common.rs Implementation of import_name_type 2022-08-26 09:15:35 -07:00
consts.rs Implementation of import_name_type 2022-08-26 09:15:35 -07:00
context.rs Do not use void pointer for ptr_mask intrinsic 2022-08-21 05:27:14 +04:00
declare.rs Add fine-grained LLVM CFI support to the Rust compiler 2022-07-23 10:51:34 -07:00
intrinsic.rs Auto merge of #96946 - WaffleLapkin:ptr_mask, r=scottmcm 2022-08-28 01:34:47 +00:00
lib.rs Adjust cfgs 2022-08-12 16:28:15 -04:00
llvm_util.rs Update the minimum external LLVM to 13 2022-08-14 13:46:51 -07:00
mono_item.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
type_.rs Add fine-grained LLVM CFI support to the Rust compiler 2022-07-23 10:51:34 -07:00
type_of.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
va_arg.rs Introduce Bx::switch_to_block 2022-02-24 12:18:21 +01:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00