rust/tests
bors bc888958c9 Auto merge of #111440 - cjgillot:refprop-debuginfo, r=oli-obk
Allow MIR debuginfo to point to a variable's address

MIR optimizations currently do not to operate on borrowed locals.

When enabling #106285, many borrows will be left as-is because they are used in debuginfo. This pass allows to replace this pattern directly in MIR debuginfo:
```rust
a => _1
_1 = &raw? mut? _2
```
becomes
```rust
a => &_2
// No statement to borrow _2.
```

This pass is implemented as a drive-by in ReferencePropagation MIR pass.

This transformation allows following following MIR opts to treat _2 as an unborrowed local, and optimize it as such, even in builds with debuginfo.

In codegen, when encountering `a => &..&_2`, we create a list of allocas:
```llvm
store ptr %_2.dbg.spill, ptr %a.ref0.dbg.spill
store ptr %a.ref0.dbg.spill, ptr %a.ref1.dbg.spill
...
call void `@llvm.dbg.declare(metadata` ptr %a.ref{n}.dbg.spill, /* ... */)
```

Caveat: this transformation looses the exact type, we do not differentiate `a` as a immutable, mutable reference or a raw pointer. Everything is declared to `*mut` to codegen. I'm not convinced this is a blocker.
2023-05-14 05:31:10 +00:00
..
assembly
auxiliary
codegen Remove useless assumes from slice::iter(_mut) 2023-05-12 17:34:55 -07:00
codegen-units
debuginfo Add multiple borrow test. 2023-05-13 10:32:32 +00:00
incremental
mir-opt Add multiple borrow test. 2023-05-13 10:32:32 +00:00
pretty
run-make Rollup merge of #111469 - Dushistov:fix-coverage-data-race, r=wesleywiser 2023-05-13 11:05:34 +05:30
run-make-fulldeps
run-pass-valgrind
rustdoc Use proper impl self type for alias impl in rustdoc 2023-05-10 22:49:05 +00:00
rustdoc-gui Convert some GUI tests color checks to use original format 2023-05-11 11:49:16 +02:00
rustdoc-js
rustdoc-js-std
rustdoc-json
rustdoc-ui Fix backtrace normalization in ice-bug-report-url.rs 2023-05-11 13:59:38 +02:00
ui Auto merge of #111425 - Bryanskiy:privacy_ef, r=petrochenkov 2023-05-14 02:53:52 +00:00
ui-fulldeps Rollup merge of #110747 - oli-obk:smirty, r=spastorino 2023-05-10 06:12:13 +02:00
COMPILER_TESTS.md