diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-12-04 18:26:09 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-09 17:59:34 +0000 |
| commit | 34903755701a5595ee4bab3bb89de15c5469cd3e (patch) | |
| tree | 86d662115d239932ad2f5f5ebddf431be78ce84a /tests/mir-opt/reference_prop.read_through_raw.ReferencePropagation.diff | |
| parent | f7b831ac8a897273f78b9f47165cf8e54066ce4b (diff) | |
| download | rust-34903755701a5595ee4bab3bb89de15c5469cd3e.tar.gz rust-34903755701a5595ee4bab3bb89de15c5469cd3e.zip | |
Implement SSA-based reference propagation.
Diffstat (limited to 'tests/mir-opt/reference_prop.read_through_raw.ReferencePropagation.diff')
| -rw-r--r-- | tests/mir-opt/reference_prop.read_through_raw.ReferencePropagation.diff | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/mir-opt/reference_prop.read_through_raw.ReferencePropagation.diff b/tests/mir-opt/reference_prop.read_through_raw.ReferencePropagation.diff new file mode 100644 index 00000000000..a7d505c6906 --- /dev/null +++ b/tests/mir-opt/reference_prop.read_through_raw.ReferencePropagation.diff @@ -0,0 +1,24 @@ +- // MIR for `read_through_raw` before ReferencePropagation ++ // MIR for `read_through_raw` after ReferencePropagation + + fn read_through_raw(_1: &mut usize) -> usize { + let mut _0: usize; // return place in scope 0 at $DIR/reference_prop.rs:+0:39: +0:44 + let mut _2: &mut usize; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + let mut _3: &mut usize; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + let mut _4: *mut usize; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + let mut _5: *mut usize; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + + bb0: { + _2 = &mut (*_1); // scope 0 at $DIR/reference_prop.rs:+10:13: +10:25 +- _3 = &mut (*_2); // scope 0 at $DIR/reference_prop.rs:+11:13: +11:26 +- _4 = &raw mut (*_2); // scope 0 at $DIR/reference_prop.rs:+12:13: +12:30 +- _5 = &raw mut (*_3); // scope 0 at $DIR/reference_prop.rs:+13:13: +13:30 +- _0 = (*_4); // scope 0 at $DIR/reference_prop.rs:+15:13: +15:22 +- _0 = (*_5); // scope 0 at $DIR/reference_prop.rs:+16:13: +16:22 ++ _3 = &mut (*_1); // scope 0 at $DIR/reference_prop.rs:+11:13: +11:26 ++ _0 = (*_2); // scope 0 at $DIR/reference_prop.rs:+15:13: +15:22 ++ _0 = (*_3); // scope 0 at $DIR/reference_prop.rs:+16:13: +16:22 + return; // scope 0 at $DIR/reference_prop.rs:+17:13: +17:21 + } + } + |
