Rollup merge of #126502 - cuviper:dump-mir-exclude-alloc-bytes, r=estebank

Ignore allocation bytes in some mir-opt tests

This adds `rustc -Zdump-mir-exclude-alloc-bytes` to skip writing allocation bytes in MIR dumps, and applies it to tests that were failing on s390x due to its big-endian byte order.

Fixes #126261
This commit is contained in:
Jubilee 2024-07-12 13:47:05 -07:00 committed by GitHub
commit 5d56572f06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
72 changed files with 225 additions and 410 deletions

View File

@ -691,6 +691,7 @@ macro_rules! untracked {
untracked!(dump_mir, Some(String::from("abc")));
untracked!(dump_mir_dataflow, true);
untracked!(dump_mir_dir, String::from("abc"));
untracked!(dump_mir_exclude_alloc_bytes, true);
untracked!(dump_mir_exclude_pass_number, true);
untracked!(dump_mir_graphviz, true);
untracked!(dump_mono_stats, SwitchWithOptPath::Enabled(Some("mono-items-dir/".into())));

View File

@ -1545,6 +1545,9 @@ fn fmt(&self, w: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
// We are done.
return write!(w, " {{}}");
}
if tcx.sess.opts.unstable_opts.dump_mir_exclude_alloc_bytes {
return write!(w, " {{ .. }}");
}
// Write allocation bytes.
writeln!(w, " {{")?;
write_allocation_bytes(tcx, alloc, w, " ")?;

View File

@ -1687,6 +1687,8 @@ pub(crate) fn parse_wasm_c_abi(slot: &mut WasmCAbi, v: Option<&str>) -> bool {
(default: no)"),
dump_mir_dir: String = ("mir_dump".to_string(), parse_string, [UNTRACKED],
"the directory the MIR is dumped into (default: `mir_dump`)"),
dump_mir_exclude_alloc_bytes: bool = (false, parse_bool, [UNTRACKED],
"exclude the raw bytes of allocations when dumping MIR (used in tests) (default: no)"),
dump_mir_exclude_pass_number: bool = (false, parse_bool, [UNTRACKED],
"exclude the pass number when dumping MIR (used in tests) (default: no)"),
dump_mir_graphviz: bool = (false, parse_bool, [UNTRACKED],

View File

@ -119,11 +119,7 @@
}
}
ALLOC0 (size: 8, align: 4) {
20 00 00 00 20 00 00 00 │ ... ...
}
ALLOC0 (size: 8, align: 4) { .. }
ALLOC1 (size: 4, align: 2) {
01 00 63 00 │ ..c.
}
ALLOC1 (size: 4, align: 2) { .. }

View File

@ -1,5 +1,5 @@
//@ test-mir-pass: SingleUseConsts
//@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN
//@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN -Zdump-mir-exclude-alloc-bytes
#![allow(unused)]

View File

@ -44,9 +44,7 @@
StorageDead(_2);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 01 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -1,4 +1,5 @@
//@ test-mir-pass: GVN
//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR address_of_pair.fn0.GVN.diff
pub fn fn0() -> bool {

View File

@ -24,9 +24,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 02 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -24,9 +24,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 02 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -1,6 +1,6 @@
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ test-mir-pass: GVN
//@ compile-flags: -C overflow-checks=on
//@ compile-flags: -C overflow-checks=on -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR checked_add.main.GVN.diff
fn main() {

View File

@ -24,9 +24,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 2a 00 00 00 2b 00 00 00 │ *...+...
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -1,4 +1,5 @@
//@ test-mir-pass: GVN
//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR mutable_variable_aggregate.main.GVN.diff
fn main() {

View File

@ -31,9 +31,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 2a 00 00 00 2b 00 00 00 │ *...+...
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -1,4 +1,5 @@
//@ test-mir-pass: GVN
//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR mutable_variable_aggregate_mut_ref.main.GVN.diff
fn main() {

View File

@ -48,9 +48,7 @@
+ nop;
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 01 00 00 00 02 00 00 00 │ ........
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -48,9 +48,7 @@
+ nop;
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 01 00 00 00 02 00 00 00 │ ........
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -1,5 +1,6 @@
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ test-mir-pass: GVN
//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR mutable_variable_unprop_assign.main.GVN.diff
fn main() {

View File

@ -17,9 +17,7 @@
+ _0 = const 4_u32;
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 04 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -17,9 +17,7 @@
+ _0 = const 4_u32;
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 04 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -15,6 +15,4 @@ fn add() -> u32 {
}
}
ALLOC0 (size: 8, align: 4) {
04 00 00 00 00 __ __ __ .....
}
ALLOC0 (size: 8, align: 4) { .. }

View File

@ -15,6 +15,4 @@ fn add() -> u32 {
}
}
ALLOC0 (size: 8, align: 4) {
04 00 00 00 00 __ __ __ .....
}
ALLOC0 (size: 8, align: 4) { .. }

View File

@ -1,6 +1,6 @@
//@ test-mir-pass: GVN
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ compile-flags: -C overflow-checks=on
//@ compile-flags: -C overflow-checks=on -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR return_place.add.GVN.diff
// EMIT_MIR return_place.add.PreCodegen.before.mir

View File

@ -49,9 +49,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 12, align: 4) {
+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
}
+
+ ALLOC0 (size: 12, align: 4) { .. }

View File

@ -49,9 +49,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 12, align: 4) {
+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
}
+
+ ALLOC0 (size: 12, align: 4) { .. }

View File

@ -49,9 +49,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 12, align: 4) {
+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
}
+
+ ALLOC0 (size: 12, align: 4) { .. }

View File

@ -49,9 +49,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 12, align: 4) {
+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
}
+
+ ALLOC0 (size: 12, align: 4) { .. }

View File

@ -1,5 +1,5 @@
//@ test-mir-pass: GVN
//@ compile-flags: -Zmir-enable-passes=+InstSimplify
//@ compile-flags: -Zmir-enable-passes=+InstSimplify -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR_FOR_EACH_BIT_WIDTH

View File

@ -31,9 +31,7 @@
+ nop;
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 01 00 00 00 02 00 00 00 │ ........
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -31,9 +31,7 @@
+ nop;
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 01 00 00 00 02 00 00 00 │ ........
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -1,4 +1,5 @@
//@ test-mir-pass: GVN
//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR tuple_literal_propagation.main.GVN.diff

View File

@ -76,13 +76,9 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 00 00 00 80 01 __ __ __ │ .....░░░
+ }
+
+ ALLOC1 (size: 8, align: 4) {
+ 03 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }
+
+ ALLOC1 (size: 8, align: 4) { .. }

View File

@ -76,13 +76,9 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 00 00 00 80 01 __ __ __ │ .....░░░
+ }
+
+ ALLOC1 (size: 8, align: 4) {
+ 03 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }
+
+ ALLOC1 (size: 8, align: 4) { .. }

View File

@ -1,5 +1,5 @@
//@ test-mir-pass: DataflowConstProp
//@ compile-flags: -Coverflow-checks=on
//@ compile-flags: -Coverflow-checks=on -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR checked.main.DataflowConstProp.diff

View File

@ -94,15 +94,9 @@
}
}
ALLOC2 (size: 8, align: 4) {
01 00 00 00 00 00 00 00 │ ........
}
ALLOC2 (size: 8, align: 4) { .. }
ALLOC1 (size: 8, align: 4) {
01 00 00 00 00 00 00 00 │ ........
}
ALLOC1 (size: 8, align: 4) { .. }
ALLOC0 (size: 8, align: 4) {
01 00 00 00 00 00 00 00 │ ........
}
ALLOC0 (size: 8, align: 4) { .. }

View File

@ -98,15 +98,9 @@
}
}
ALLOC2 (size: 8, align: 4) {
01 00 00 00 00 00 00 00 │ ........
}
ALLOC2 (size: 8, align: 4) { .. }
ALLOC1 (size: 8, align: 4) {
01 00 00 00 00 00 00 00 │ ........
}
ALLOC1 (size: 8, align: 4) { .. }
ALLOC0 (size: 8, align: 4) {
01 00 00 00 00 00 00 00 │ ........
}
ALLOC0 (size: 8, align: 4) { .. }

View File

@ -94,15 +94,9 @@
}
}
ALLOC2 (size: 16, align: 8) {
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
}
ALLOC2 (size: 16, align: 8) { .. }
ALLOC1 (size: 16, align: 8) {
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
}
ALLOC1 (size: 16, align: 8) { .. }
ALLOC0 (size: 16, align: 8) {
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
}
ALLOC0 (size: 16, align: 8) { .. }

View File

@ -98,15 +98,9 @@
}
}
ALLOC2 (size: 16, align: 8) {
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
}
ALLOC2 (size: 16, align: 8) { .. }
ALLOC1 (size: 16, align: 8) {
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
}
ALLOC1 (size: 16, align: 8) { .. }
ALLOC0 (size: 16, align: 8) {
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
}
ALLOC0 (size: 16, align: 8) { .. }

View File

@ -102,17 +102,11 @@
_0 = const ();
drop(_1) -> [return: bb1, unwind unreachable];
}
+ }
+
+ ALLOC2 (size: 8, align: 4) {
+ 01 00 00 00 00 00 00 00 │ ........
+ }
+
+ ALLOC1 (size: 8, align: 4) {
+ 01 00 00 00 00 00 00 00 │ ........
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 01 00 00 00 00 00 00 00 │ ........
}
+
+ ALLOC2 (size: 8, align: 4) { .. }
+
+ ALLOC1 (size: 8, align: 4) { .. }
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -106,17 +106,11 @@
_0 = const ();
drop(_1) -> [return: bb1, unwind: bb2];
}
+ }
+
+ ALLOC2 (size: 8, align: 4) {
+ 01 00 00 00 00 00 00 00 │ ........
+ }
+
+ ALLOC1 (size: 8, align: 4) {
+ 01 00 00 00 00 00 00 00 │ ........
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 01 00 00 00 00 00 00 00 │ ........
}
+
+ ALLOC2 (size: 8, align: 4) { .. }
+
+ ALLOC1 (size: 8, align: 4) { .. }
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -102,17 +102,11 @@
_0 = const ();
drop(_1) -> [return: bb1, unwind unreachable];
}
+ }
+
+ ALLOC2 (size: 16, align: 8) {
+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+ }
+
+ ALLOC1 (size: 16, align: 8) {
+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+ }
+
+ ALLOC0 (size: 16, align: 8) {
+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
}
+
+ ALLOC2 (size: 16, align: 8) { .. }
+
+ ALLOC1 (size: 16, align: 8) { .. }
+
+ ALLOC0 (size: 16, align: 8) { .. }

View File

@ -106,17 +106,11 @@
_0 = const ();
drop(_1) -> [return: bb1, unwind: bb2];
}
+ }
+
+ ALLOC2 (size: 16, align: 8) {
+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+ }
+
+ ALLOC1 (size: 16, align: 8) {
+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+ }
+
+ ALLOC0 (size: 16, align: 8) {
+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
}
+
+ ALLOC2 (size: 16, align: 8) { .. }
+
+ ALLOC1 (size: 16, align: 8) { .. }
+
+ ALLOC0 (size: 16, align: 8) { .. }

View File

@ -1,5 +1,5 @@
//@ test-mir-pass: DataflowConstProp
//@ compile-flags: -Zmir-enable-passes=+GVN,+Inline
//@ compile-flags: -Zmir-enable-passes=+GVN,+Inline -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR_FOR_EACH_BIT_WIDTH
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

View File

@ -1,4 +1,5 @@
//@ test-mir-pass: DataflowConstProp
//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR_FOR_EACH_BIT_WIDTH
#![feature(custom_mir, core_intrinsics, rustc_attrs)]

View File

@ -60,9 +60,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 00 00 00 00 00 00 00 00 │ ........
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -60,9 +60,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 00 00 00 00 00 00 00 00 │ ........
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -43,7 +43,7 @@
bb0: {
StorageLive(_1);
StorageLive(_2);
_2 = const {ALLOC1: &E};
_2 = const {ALLOC0: &E};
- _1 = (*_2);
+ _1 = const E::V1(0_i32);
StorageDead(_2);
@ -79,7 +79,7 @@
bb4: {
StorageLive(_7);
StorageLive(_8);
_8 = const {ALLOC2: &&E};
_8 = const {ALLOC1: &&E};
_7 = (*_8);
StorageDead(_8);
StorageLive(_9);
@ -111,21 +111,14 @@
StorageDead(_1);
return;
}
+ }
}
+ ALLOC2 (size: 8, align: 4) { .. }
+
+ ALLOC3 (size: 8, align: 4) {
+ 00 00 00 00 00 00 00 00 │ ........
}
ALLOC1 (static: RC, size: 4, align: 4) { .. }
ALLOC2 (static: RC, size: 4, align: 4) {
╾ALLOC0<imm>╼ │ ╾──╼
}
- ALLOC2 (size: 8, align: 4) { .. }
+ ALLOC3 (size: 8, align: 4) { .. }
ALLOC0 (size: 8, align: 4) {
01 00 00 00 04 00 00 00 │ ........
}
ALLOC1 (static: statics::C, size: 8, align: 4) {
00 00 00 00 00 00 00 00 │ ........
}
ALLOC0 (static: statics::C, size: 8, align: 4) { .. }

View File

@ -43,7 +43,7 @@
bb0: {
StorageLive(_1);
StorageLive(_2);
_2 = const {ALLOC1: &E};
_2 = const {ALLOC0: &E};
- _1 = (*_2);
+ _1 = const E::V1(0_i32);
StorageDead(_2);
@ -79,7 +79,7 @@
bb4: {
StorageLive(_7);
StorageLive(_8);
_8 = const {ALLOC2: &&E};
_8 = const {ALLOC1: &&E};
_7 = (*_8);
StorageDead(_8);
StorageLive(_9);
@ -111,21 +111,14 @@
StorageDead(_1);
return;
}
+ }
}
+ ALLOC2 (size: 8, align: 4) { .. }
+
+ ALLOC3 (size: 8, align: 4) {
+ 00 00 00 00 00 00 00 00 │ ........
}
ALLOC1 (static: RC, size: 8, align: 8) { .. }
ALLOC2 (static: RC, size: 8, align: 8) {
╾ALLOC0<imm>╼ │ ╾──────╼
}
- ALLOC2 (size: 8, align: 4) { .. }
+ ALLOC3 (size: 8, align: 4) { .. }
ALLOC0 (size: 8, align: 4) {
01 00 00 00 04 00 00 00 │ ........
}
ALLOC1 (static: statics::C, size: 8, align: 4) {
00 00 00 00 00 00 00 00 │ ........
}
ALLOC0 (static: statics::C, size: 8, align: 4) { .. }

View File

@ -112,7 +112,7 @@
_9 = (_10.2: &[f32]);
StorageDead(_10);
StorageLive(_14);
_14 = const {ALLOC4: &&SmallStruct};
_14 = const {ALLOC0: &&SmallStruct};
_31 = deref_copy (*_14);
StorageLive(_11);
_32 = deref_copy (*_14);
@ -149,7 +149,7 @@
_21 = (_22.2: &[f32]);
StorageDead(_22);
StorageLive(_26);
_26 = const {ALLOC5: &&BigStruct};
_26 = const {ALLOC1: &&BigStruct};
_35 = deref_copy (*_26);
StorageLive(_23);
_36 = deref_copy (*_26);
@ -197,51 +197,31 @@
StorageDead(_1);
return;
}
+ }
}
+ ALLOC2 (size: 8, align: 4) { .. }
+
+ ALLOC6 (size: 8, align: 4) {
+ 01 00 00 00 23 00 00 00 │ ....#...
+ }
+ ALLOC3 (size: 8, align: 4) { .. }
+
+ ALLOC7 (size: 8, align: 4) {
+ 01 00 00 00 23 00 00 00 │ ....#...
+ }
+ ALLOC4 (size: 8, align: 4) { .. }
+
+ ALLOC8 (size: 8, align: 4) {
+ 01 00 00 00 23 00 00 00 │ ....#...
+ }
+ ALLOC5 (size: 8, align: 4) { .. }
+
+ ALLOC9 (size: 8, align: 4) {
+ 01 00 00 00 01 00 00 00 │ ........
+ }
+ ALLOC6 (size: 4, align: 4) { .. }
+
+ ALLOC10 (size: 4, align: 4) {
+ 01 00 00 00 │ ....
}
ALLOC1 (static: BIG_STAT, size: 4, align: 4) { .. }
ALLOC5 (static: BIG_STAT, size: 4, align: 4) {
╾ALLOC0<imm>╼ │ ╾──╼
}
- ALLOC2 (size: 20, align: 4) { .. }
+ ALLOC7 (size: 20, align: 4) { .. }
ALLOC0 (size: 20, align: 4) {
0x00 │ 01 00 00 00 23 00 00 00 ╾ALLOC1<imm>╼ 02 00 00 00 │ ....#...╾──╼....
0x10 │ 00 00 a4 42 │ ...B
}
- ALLOC3 (size: 8, align: 4) { .. }
+ ALLOC8 (size: 8, align: 4) { .. }
ALLOC1 (size: 8, align: 4) {
00 00 34 42 00 00 90 42 │ ..4B...B
}
ALLOC0 (static: SMALL_STAT, size: 4, align: 4) { .. }
ALLOC4 (static: SMALL_STAT, size: 4, align: 4) {
╾ALLOC2<imm>╼ │ ╾──╼
}
- ALLOC4 (size: 20, align: 4) { .. }
+ ALLOC9 (size: 20, align: 4) { .. }
ALLOC2 (size: 20, align: 4) {
0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC3<imm>╼ 01 00 00 00 │ ....░░░░╾──╼....
0x10 │ 00 00 10 41 │ ...A
}
ALLOC3 (size: 4, align: 4) {
00 00 50 41 │ ..PA
}
- ALLOC5 (size: 4, align: 4) { .. }
+ ALLOC10 (size: 4, align: 4) { .. }

View File

@ -112,7 +112,7 @@
_9 = (_10.2: &[f32]);
StorageDead(_10);
StorageLive(_14);
_14 = const {ALLOC4: &&SmallStruct};
_14 = const {ALLOC0: &&SmallStruct};
_31 = deref_copy (*_14);
StorageLive(_11);
_32 = deref_copy (*_14);
@ -149,7 +149,7 @@
_21 = (_22.2: &[f32]);
StorageDead(_22);
StorageLive(_26);
_26 = const {ALLOC5: &&BigStruct};
_26 = const {ALLOC1: &&BigStruct};
_35 = deref_copy (*_26);
StorageLive(_23);
_36 = deref_copy (*_26);
@ -197,51 +197,31 @@
StorageDead(_1);
return;
}
+ }
}
+ ALLOC2 (size: 8, align: 4) { .. }
+
+ ALLOC6 (size: 8, align: 4) {
+ 01 00 00 00 23 00 00 00 │ ....#...
+ }
+ ALLOC3 (size: 8, align: 4) { .. }
+
+ ALLOC7 (size: 8, align: 4) {
+ 01 00 00 00 23 00 00 00 │ ....#...
+ }
+ ALLOC4 (size: 8, align: 4) { .. }
+
+ ALLOC8 (size: 8, align: 4) {
+ 01 00 00 00 23 00 00 00 │ ....#...
+ }
+ ALLOC5 (size: 8, align: 4) { .. }
+
+ ALLOC9 (size: 8, align: 4) {
+ 01 00 00 00 01 00 00 00 │ ........
+ }
+ ALLOC6 (size: 4, align: 4) { .. }
+
+ ALLOC10 (size: 4, align: 4) {
+ 01 00 00 00 │ ....
}
ALLOC1 (static: BIG_STAT, size: 8, align: 8) { .. }
ALLOC5 (static: BIG_STAT, size: 8, align: 8) {
╾ALLOC0<imm>╼ │ ╾──────╼
}
- ALLOC2 (size: 32, align: 8) { .. }
+ ALLOC7 (size: 32, align: 8) { .. }
ALLOC0 (size: 32, align: 8) {
0x00 │ 01 00 00 00 23 00 00 00 ╾ALLOC1<imm>╼ │ ....#...╾──────╼
0x10 │ 02 00 00 00 00 00 00 00 00 00 a4 42 __ __ __ __ │ ...........B░░░░
}
- ALLOC3 (size: 8, align: 4) { .. }
+ ALLOC8 (size: 8, align: 4) { .. }
ALLOC1 (size: 8, align: 4) {
00 00 34 42 00 00 90 42 │ ..4B...B
}
ALLOC0 (static: SMALL_STAT, size: 8, align: 8) { .. }
ALLOC4 (static: SMALL_STAT, size: 8, align: 8) {
╾ALLOC2<imm>╼ │ ╾──────╼
}
- ALLOC4 (size: 32, align: 8) { .. }
+ ALLOC9 (size: 32, align: 8) { .. }
ALLOC2 (size: 32, align: 8) {
0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC3<imm>╼ │ ....░░░░╾──────╼
0x10 │ 01 00 00 00 00 00 00 00 00 00 10 41 __ __ __ __ │ ...........A░░░░
}
ALLOC3 (size: 4, align: 4) {
00 00 50 41 │ ..PA
}
- ALLOC5 (size: 4, align: 4) { .. }
+ ALLOC10 (size: 4, align: 4) { .. }

View File

@ -1,4 +1,5 @@
//@ test-mir-pass: DataflowConstProp
//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR_FOR_EACH_BIT_WIDTH
#[derive(Copy, Clone)]

View File

@ -92,21 +92,13 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 02 00 00 00 03 00 00 00 │ ........
+ }
+
+ ALLOC1 (size: 8, align: 4) {
+ 02 00 00 00 03 00 00 00 │ ........
+ }
+
+ ALLOC2 (size: 8, align: 4) {
+ 02 00 00 00 03 00 00 00 │ ........
+ }
+
+ ALLOC3 (size: 8, align: 4) {
+ 01 00 00 00 02 00 00 00 │ ........
}
+
+ ALLOC0 (size: 8, align: 4) { .. }
+
+ ALLOC1 (size: 8, align: 4) { .. }
+
+ ALLOC2 (size: 8, align: 4) { .. }
+
+ ALLOC3 (size: 8, align: 4) { .. }

View File

@ -92,21 +92,13 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 02 00 00 00 03 00 00 00 │ ........
+ }
+
+ ALLOC1 (size: 8, align: 4) {
+ 02 00 00 00 03 00 00 00 │ ........
+ }
+
+ ALLOC2 (size: 8, align: 4) {
+ 02 00 00 00 03 00 00 00 │ ........
+ }
+
+ ALLOC3 (size: 8, align: 4) {
+ 01 00 00 00 02 00 00 00 │ ........
}
+
+ ALLOC0 (size: 8, align: 4) { .. }
+
+ ALLOC1 (size: 8, align: 4) { .. }
+
+ ALLOC2 (size: 8, align: 4) { .. }
+
+ ALLOC3 (size: 8, align: 4) { .. }

View File

@ -1,4 +1,5 @@
//@ test-mir-pass: DataflowConstProp
//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR_FOR_EACH_BIT_WIDTH
// EMIT_MIR tuple.main.DataflowConstProp.diff

View File

@ -64,9 +64,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 02 00 00 00 05 20 00 00 │ ..... ..
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -64,9 +64,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 16, align: 8) {
+ 02 00 00 00 00 00 00 00 05 20 00 00 00 00 00 00 │ ......... ......
}
+
+ ALLOC0 (size: 16, align: 8) { .. }

View File

@ -1,7 +1,7 @@
// skip-filecheck
//@ test-mir-pass: EnumSizeOpt
// EMIT_MIR_FOR_EACH_BIT_WIDTH
//@ compile-flags: -Zunsound-mir-opts
//@ compile-flags: -Zunsound-mir-opts -Zdump-mir-exclude-alloc-bytes
#![feature(arbitrary_enum_discriminant, repr128)]

View File

@ -64,9 +64,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 05 20 00 00 01 00 00 00 │ . ......
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -64,9 +64,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 16, align: 8) {
+ 05 20 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ . ..............
}
+
+ ALLOC0 (size: 16, align: 8) { .. }

View File

@ -140,9 +140,7 @@
_0 = const ();
return;
}
+ }
+
+ ALLOC0 (size: 16, align: 8) {
+ 00 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ │ .........░░░░░░░
}
+
+ ALLOC0 (size: 16, align: 8) { .. }

View File

@ -140,9 +140,7 @@
_0 = const ();
return;
}
+ }
+
+ ALLOC0 (size: 16, align: 8) {
+ 00 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ │ .........░░░░░░░
}
+
+ ALLOC0 (size: 16, align: 8) { .. }

View File

@ -8,10 +8,10 @@
let mut _3: fn(u8) -> u8;
let _5: ();
let mut _6: fn(u8) -> u8;
let mut _9: {closure@$DIR/gvn.rs:614:19: 614:21};
let mut _9: {closure@$DIR/gvn.rs:615:19: 615:21};
let _10: ();
let mut _11: fn();
let mut _13: {closure@$DIR/gvn.rs:614:19: 614:21};
let mut _13: {closure@$DIR/gvn.rs:615:19: 615:21};
let _14: ();
let mut _15: fn();
scope 1 {
@ -19,7 +19,7 @@
let _4: fn(u8) -> u8;
scope 2 {
debug g => _4;
let _7: {closure@$DIR/gvn.rs:614:19: 614:21};
let _7: {closure@$DIR/gvn.rs:615:19: 615:21};
scope 3 {
debug closure => _7;
let _8: fn();
@ -62,16 +62,16 @@
StorageDead(_6);
StorageDead(_5);
- StorageLive(_7);
- _7 = {closure@$DIR/gvn.rs:614:19: 614:21};
- _7 = {closure@$DIR/gvn.rs:615:19: 615:21};
- StorageLive(_8);
+ nop;
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:614:19: 614:21};
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
+ nop;
StorageLive(_9);
- _9 = _7;
- _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:614:19: 614:21};
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:614:19: 614:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
StorageDead(_9);
StorageLive(_10);
StorageLive(_11);
@ -88,8 +88,8 @@
StorageLive(_13);
- _13 = _7;
- _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:614:19: 614:21};
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:614:19: 614:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
StorageDead(_13);
StorageLive(_14);
StorageLive(_15);

View File

@ -8,10 +8,10 @@
let mut _3: fn(u8) -> u8;
let _5: ();
let mut _6: fn(u8) -> u8;
let mut _9: {closure@$DIR/gvn.rs:614:19: 614:21};
let mut _9: {closure@$DIR/gvn.rs:615:19: 615:21};
let _10: ();
let mut _11: fn();
let mut _13: {closure@$DIR/gvn.rs:614:19: 614:21};
let mut _13: {closure@$DIR/gvn.rs:615:19: 615:21};
let _14: ();
let mut _15: fn();
scope 1 {
@ -19,7 +19,7 @@
let _4: fn(u8) -> u8;
scope 2 {
debug g => _4;
let _7: {closure@$DIR/gvn.rs:614:19: 614:21};
let _7: {closure@$DIR/gvn.rs:615:19: 615:21};
scope 3 {
debug closure => _7;
let _8: fn();
@ -62,16 +62,16 @@
StorageDead(_6);
StorageDead(_5);
- StorageLive(_7);
- _7 = {closure@$DIR/gvn.rs:614:19: 614:21};
- _7 = {closure@$DIR/gvn.rs:615:19: 615:21};
- StorageLive(_8);
+ nop;
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:614:19: 614:21};
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
+ nop;
StorageLive(_9);
- _9 = _7;
- _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:614:19: 614:21};
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:614:19: 614:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
StorageDead(_9);
StorageLive(_10);
StorageLive(_11);
@ -88,8 +88,8 @@
StorageLive(_13);
- _13 = _7;
- _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:614:19: 614:21};
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:614:19: 614:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
StorageDead(_13);
StorageLive(_14);
StorageLive(_15);

View File

@ -13,7 +13,5 @@
}
}
ALLOC0 (static: A, size: 2, align: 1) {
00 __ │ .░
}
ALLOC0 (static: A, size: 2, align: 1) { .. }

View File

@ -13,7 +13,5 @@
}
}
ALLOC0 (static: A, size: 2, align: 1) {
00 __ │ .░
}
ALLOC0 (static: A, size: 2, align: 1) { .. }

View File

@ -1,4 +1,5 @@
//@ test-mir-pass: GVN
//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ only-64bit

View File

@ -176,13 +176,9 @@
+ nop;
return;
}
+ }
+
+ ALLOC1 (size: 16, align: 8) {
+ 01 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 │ ................
+ }
+
+ ALLOC0 (size: 16, align: 8) {
+ 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ ................
}
+
+ ALLOC1 (size: 16, align: 8) { .. }
+
+ ALLOC0 (size: 16, align: 8) { .. }

View File

@ -176,13 +176,9 @@
+ nop;
return;
}
+ }
+
+ ALLOC1 (size: 16, align: 8) {
+ 01 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 │ ................
+ }
+
+ ALLOC0 (size: 16, align: 8) {
+ 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ ................
}
+
+ ALLOC1 (size: 16, align: 8) { .. }
+
+ ALLOC0 (size: 16, align: 8) { .. }

View File

@ -61,9 +61,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 04 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -61,9 +61,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 04 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -61,9 +61,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 04 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -61,9 +61,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 04 00 00 00 00 __ __ __ │ .....░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View File

@ -1,6 +1,6 @@
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ compile-flags: -C overflow-checks=on
//@ compile-flags: -C overflow-checks=on -Zdump-mir-exclude-alloc-bytes
struct Point {
x: u32,