about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-11 04:24:40 +0000
committerbors <bors@rust-lang.org>2024-02-11 04:24:40 +0000
commit9aa232ecc7bb006a1fad404f437b049482021a3a (patch)
treea6466fba328f53939cfa4b2b2848311363ec1a5e /compiler/rustc_codegen_llvm/src
parent0cbef48150e1fab161b5fd147b57ceb3f9272a52 (diff)
parent7a6b00e786cf0b245f95a86123ef8130fa159523 (diff)
downloadrust-9aa232ecc7bb006a1fad404f437b049482021a3a.tar.gz
rust-9aa232ecc7bb006a1fad404f437b049482021a3a.zip
Auto merge of #120405 - cjgillot:gvn-pointer, r=oli-obk
Fold pointer operations in GVN

This PR proposes 2 combinations of cast operations in MIR GVN:
- a chain of `PtrToPtr` or `MutToConstPointer` casts can be folded together into a single `PtrToPtr` cast;
- we attempt to evaluate more ptr ops when there is no provenance.

In particular, this allows to read from static slices.

This is not yet sufficient to see through slice operations that use `PtrComponents` (because that's a union), but still a step forward.

r? `@ghost`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions