Skip to content

Commit 2ee3cd2

Browse files
committed
Reorder MIR passes.
1 parent 1745b45 commit 2ee3cd2

File tree

64 files changed

+1505
-1720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1505
-1720
lines changed

compiler/rustc_mir_transform/src/dead_store_elimination.rs

+2
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,15 @@ pub fn eliminate<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
127127

128128
pub enum DeadStoreElimination {
129129
Initial,
130+
AfterJumpThreading,
130131
Final,
131132
}
132133

133134
impl<'tcx> MirPass<'tcx> for DeadStoreElimination {
134135
fn name(&self) -> &'static str {
135136
match self {
136137
DeadStoreElimination::Initial => "DeadStoreElimination-initial",
138+
DeadStoreElimination::AfterJumpThreading => "DeadStoreElimination-after-jump-threading",
137139
DeadStoreElimination::Final => "DeadStoreElimination-final",
138140
}
139141
}

compiler/rustc_mir_transform/src/gvn.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,19 @@ use crate::dataflow_const_prop::DummyMachine;
105105
use crate::ssa::{AssignedValue, SsaLocals};
106106
use either::Either;
107107

108-
pub struct GVN;
108+
pub enum GVN {
109+
Initial,
110+
Final,
111+
}
109112

110113
impl<'tcx> MirPass<'tcx> for GVN {
114+
fn name(&self) -> &'static str {
115+
match self {
116+
GVN::Initial => "GVN",
117+
GVN::Final => "GVN-final",
118+
}
119+
}
120+
111121
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
112122
sess.mir_opt_level() >= 2
113123
}

compiler/rustc_mir_transform/src/lib.rs

+37-16
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
565565
&check_alignment::CheckAlignment,
566566
// Before inlining: trim down MIR with passes to reduce inlining work.
567567

568-
// Has to be done before inlining, otherwise actual call will be almost always inlined.
568+
// has to be done before inlining, otherwise actual call will be almost always inlined.
569569
// Also simple, so can just do first
570570
&lower_slice_len::LowerSliceLenCalls,
571571
// Perform inlining, which may add a lot of code.
@@ -582,30 +582,51 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
582582
// Inlining may have introduced a lot of redundant code and a large move pattern.
583583
// Now, we need to shrink the generated MIR.
584584

585-
// Has to run after `slice::len` lowering
586-
&normalize_array_len::NormalizeArrayLen,
585+
// Replace deref of borrow with direct uses.
587586
&ref_prop::ReferencePropagation,
588-
&sroa::ScalarReplacementOfAggregates,
587+
// Remove dead stores to help SSA-based analyses.
588+
&dead_store_elimination::DeadStoreElimination::Initial,
589+
// Deduplicate computations.
590+
&gvn::GVN::Initial,
591+
// GVN may have moved constant assignments in terminators.
592+
&simplify_branches::SimplifyConstCondition::AfterGVN,
593+
// Use const-prop results in debuginfo, to remove some locals' uses.
594+
&const_debuginfo::ConstDebugInfo,
595+
// Replace `if x == constant { true/false } else { false/true }` by `Eq/Ne(x, constant)`.
589596
&match_branches::MatchBranchSimplification,
590597
// inst combine is after MatchBranchSimplification to clean up Ne(_1, false)
591-
&multiple_return_terminators::MultipleReturnTerminators,
592598
&instsimplify::InstSimplify,
599+
// Turn non-aliasing places into locals.
600+
// Helps `DeadStoreElimination` to remove them and `CopyProp` to merge them.
601+
&simplify::SimplifyLocals::BeforeSROA,
602+
&sroa::ScalarReplacementOfAggregates,
603+
// Compute `Len` when it comes from an unsizing cast.
604+
&normalize_array_len::NormalizeArrayLen,
605+
// Perform a first round of constant propagation.
606+
&o1(simplify::SimplifyCfg::BeforeConstProp),
593607
&simplify::SimplifyLocals::BeforeConstProp,
594-
&dead_store_elimination::DeadStoreElimination::Initial,
595-
&gvn::GVN,
596-
&simplify::SimplifyLocals::AfterGVN,
597-
&dataflow_const_prop::DataflowConstProp,
598-
&const_debuginfo::ConstDebugInfo,
599-
&o1(simplify_branches::SimplifyConstCondition::AfterConstProp),
600-
&jump_threading::JumpThreading,
601-
&early_otherwise_branch::EarlyOtherwiseBranch,
608+
// Turn `SwitchInt(Eq(x, constant))` into `SwitchInt(x)`.
609+
// Runs after ConstProp to increase probability to have constants.
602610
&simplify_comparison_integral::SimplifyComparisonIntegral,
603-
&o1(simplify_branches::SimplifyConstCondition::Final),
611+
&early_otherwise_branch::EarlyOtherwiseBranch,
612+
// Merge locals that just copy each another.
613+
&copy_prop::CopyProp,
614+
// Thread jumps when possible. Note that no SSA-based pass should happen
615+
// post-jump-threading, as this pass clones blocks and demotes SSA locals.
616+
&jump_threading::JumpThreading,
617+
&dataflow_const_prop::DataflowConstProp,
618+
&simplify_branches::SimplifyConstCondition::Final,
619+
// Jump threading may have created dead stores, notably enums which discriminant we
620+
// don't read any more. Remove them.
621+
&dead_store_elimination::DeadStoreElimination::AfterJumpThreading,
622+
// Jump threading may have created wrap-upwrap sequences in enums. Remove those.
623+
&gvn::GVN::Final,
604624
&o1(remove_noop_landing_pads::RemoveNoopLandingPads),
605625
&o1(simplify::SimplifyCfg::Final),
606-
&copy_prop::CopyProp,
607-
&dead_store_elimination::DeadStoreElimination::Final,
626+
&simplify::SimplifyLocals::AfterGVN,
608627
&dest_prop::DestinationPropagation,
628+
// Attempt to promote call operands from copies to moves.
629+
&dead_store_elimination::DeadStoreElimination::Final,
609630
&simplify::SimplifyLocals::Final,
610631
&multiple_return_terminators::MultipleReturnTerminators,
611632
&deduplicate_blocks::DeduplicateBlocks,

compiler/rustc_mir_transform/src/simplify.rs

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub enum SimplifyCfg {
4242
Final,
4343
MakeShim,
4444
AfterUninhabitedEnumBranching,
45+
BeforeConstProp,
4546
}
4647

4748
impl SimplifyCfg {
@@ -57,6 +58,7 @@ impl SimplifyCfg {
5758
SimplifyCfg::AfterUninhabitedEnumBranching => {
5859
"SimplifyCfg-after-uninhabited-enum-branching"
5960
}
61+
SimplifyCfg::BeforeConstProp => "SimplifyCfg-before-const-prop",
6062
}
6163
}
6264
}
@@ -346,6 +348,7 @@ pub(crate) fn remove_dead_blocks(body: &mut Body<'_>) {
346348
}
347349

348350
pub enum SimplifyLocals {
351+
BeforeSROA,
349352
BeforeConstProp,
350353
AfterGVN,
351354
Final,
@@ -354,6 +357,7 @@ pub enum SimplifyLocals {
354357
impl<'tcx> MirPass<'tcx> for SimplifyLocals {
355358
fn name(&self) -> &'static str {
356359
match &self {
360+
SimplifyLocals::BeforeSROA => "SimplifyLocals-before-sroa",
357361
SimplifyLocals::BeforeConstProp => "SimplifyLocals-before-const-prop",
358362
SimplifyLocals::AfterGVN => "SimplifyLocals-after-value-numbering",
359363
SimplifyLocals::Final => "SimplifyLocals-final",

compiler/rustc_mir_transform/src/simplify_branches.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@ use rustc_middle::mir::*;
22
use rustc_middle::ty::TyCtxt;
33

44
pub enum SimplifyConstCondition {
5-
AfterConstProp,
5+
AfterGVN,
66
Final,
77
}
88
/// A pass that replaces a branch with a goto when its condition is known.
99
impl<'tcx> MirPass<'tcx> for SimplifyConstCondition {
1010
fn name(&self) -> &'static str {
1111
match self {
12-
SimplifyConstCondition::AfterConstProp => "SimplifyConstCondition-after-const-prop",
12+
SimplifyConstCondition::AfterGVN => "SimplifyConstCondition-after-gvn",
1313
SimplifyConstCondition::Final => "SimplifyConstCondition-final",
1414
}
1515
}
1616

17+
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
18+
match self {
19+
SimplifyConstCondition::Final => sess.mir_opt_level() >= 1,
20+
SimplifyConstCondition::AfterGVN => sess.mir_opt_level() >= 2,
21+
}
22+
}
23+
1724
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
1825
trace!("Running SimplifyConstCondition on {:?}", body.source);
1926
let param_env = tcx.param_env_reveal_all_normalized(body.source.def_id());
+20-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Function name: match_or_pattern::main
2-
Raw bytes (202): 0x[01, 01, 23, 01, 05, 05, 02, 09, 0d, 2f, 00, 09, 0d, 2b, 15, 2f, 00, 09, 0d, 15, 26, 2b, 15, 2f, 00, 09, 0d, 19, 1d, 57, 00, 19, 1d, 53, 25, 57, 00, 19, 1d, 25, 4e, 53, 25, 57, 00, 19, 1d, 29, 2d, 7f, 31, 29, 2d, 7b, 35, 7f, 31, 29, 2d, 35, 76, 7b, 35, 7f, 31, 29, 2d, 39, 3d, 8b, 01, 41, 39, 3d, 19, 01, 01, 01, 08, 0f, 05, 08, 10, 03, 06, 02, 03, 06, 00, 07, 07, 01, 0b, 00, 11, 00, 03, 1b, 00, 1d, 2f, 01, 0e, 00, 10, 2b, 02, 08, 00, 0f, 15, 00, 10, 03, 06, 26, 03, 06, 00, 07, 23, 01, 0b, 00, 11, 00, 01, 1b, 00, 1d, 57, 01, 0e, 00, 10, 53, 02, 08, 00, 0f, 25, 00, 10, 03, 06, 4e, 03, 06, 00, 07, 4b, 01, 0b, 00, 11, 31, 01, 1b, 00, 1d, 7f, 01, 0e, 00, 10, 7b, 02, 08, 00, 0f, 35, 00, 10, 03, 06, 76, 03, 06, 00, 07, 73, 01, 0b, 00, 11, 41, 01, 1b, 00, 1d, 8b, 01, 01, 0e, 00, 10, 87, 01, 02, 01, 00, 02]
2+
Raw bytes (202): 0x[01, 01, 23, 01, 05, 05, 02, 09, 0d, 2f, 00, 09, 0d, 2b, 15, 2f, 00, 09, 0d, 15, 26, 2b, 15, 2f, 00, 09, 0d, 00, 1d, 57, 00, 00, 1d, 53, 25, 57, 00, 00, 1d, 25, 4e, 53, 25, 57, 00, 00, 1d, 29, 2d, 7f, 00, 29, 2d, 7b, 35, 7f, 00, 29, 2d, 35, 76, 7b, 35, 7f, 00, 29, 2d, 00, 3d, 8b, 01, 41, 00, 3d, 19, 01, 01, 01, 08, 0f, 05, 08, 10, 03, 06, 02, 03, 06, 00, 07, 07, 01, 0b, 00, 11, 00, 03, 1b, 00, 1d, 2f, 01, 0e, 00, 10, 2b, 02, 08, 00, 0f, 15, 00, 10, 03, 06, 26, 03, 06, 00, 07, 23, 01, 0b, 00, 11, 00, 01, 1b, 00, 1d, 57, 01, 0e, 00, 10, 53, 02, 08, 00, 0f, 25, 00, 10, 03, 06, 4e, 03, 06, 00, 07, 4b, 01, 0b, 00, 11, 00, 01, 1b, 00, 1d, 7f, 01, 0e, 00, 10, 7b, 02, 08, 00, 0f, 35, 00, 10, 03, 06, 76, 03, 06, 00, 07, 73, 01, 0b, 00, 11, 41, 01, 1b, 00, 1d, 8b, 01, 01, 0e, 00, 10, 87, 01, 02, 01, 00, 02]
33
Number of files: 1
44
- file 0 => global file 1
55
Number of expressions: 35
@@ -15,29 +15,29 @@ Number of expressions: 35
1515
- expression 9 operands: lhs = Expression(10, Add), rhs = Counter(5)
1616
- expression 10 operands: lhs = Expression(11, Add), rhs = Zero
1717
- expression 11 operands: lhs = Counter(2), rhs = Counter(3)
18-
- expression 12 operands: lhs = Counter(6), rhs = Counter(7)
18+
- expression 12 operands: lhs = Zero, rhs = Counter(7)
1919
- expression 13 operands: lhs = Expression(21, Add), rhs = Zero
20-
- expression 14 operands: lhs = Counter(6), rhs = Counter(7)
20+
- expression 14 operands: lhs = Zero, rhs = Counter(7)
2121
- expression 15 operands: lhs = Expression(20, Add), rhs = Counter(9)
2222
- expression 16 operands: lhs = Expression(21, Add), rhs = Zero
23-
- expression 17 operands: lhs = Counter(6), rhs = Counter(7)
23+
- expression 17 operands: lhs = Zero, rhs = Counter(7)
2424
- expression 18 operands: lhs = Counter(9), rhs = Expression(19, Sub)
2525
- expression 19 operands: lhs = Expression(20, Add), rhs = Counter(9)
2626
- expression 20 operands: lhs = Expression(21, Add), rhs = Zero
27-
- expression 21 operands: lhs = Counter(6), rhs = Counter(7)
27+
- expression 21 operands: lhs = Zero, rhs = Counter(7)
2828
- expression 22 operands: lhs = Counter(10), rhs = Counter(11)
29-
- expression 23 operands: lhs = Expression(31, Add), rhs = Counter(12)
29+
- expression 23 operands: lhs = Expression(31, Add), rhs = Zero
3030
- expression 24 operands: lhs = Counter(10), rhs = Counter(11)
3131
- expression 25 operands: lhs = Expression(30, Add), rhs = Counter(13)
32-
- expression 26 operands: lhs = Expression(31, Add), rhs = Counter(12)
32+
- expression 26 operands: lhs = Expression(31, Add), rhs = Zero
3333
- expression 27 operands: lhs = Counter(10), rhs = Counter(11)
3434
- expression 28 operands: lhs = Counter(13), rhs = Expression(29, Sub)
3535
- expression 29 operands: lhs = Expression(30, Add), rhs = Counter(13)
36-
- expression 30 operands: lhs = Expression(31, Add), rhs = Counter(12)
36+
- expression 30 operands: lhs = Expression(31, Add), rhs = Zero
3737
- expression 31 operands: lhs = Counter(10), rhs = Counter(11)
38-
- expression 32 operands: lhs = Counter(14), rhs = Counter(15)
38+
- expression 32 operands: lhs = Zero, rhs = Counter(15)
3939
- expression 33 operands: lhs = Expression(34, Add), rhs = Counter(16)
40-
- expression 34 operands: lhs = Counter(14), rhs = Counter(15)
40+
- expression 34 operands: lhs = Zero, rhs = Counter(15)
4141
Number of file 0 mappings: 25
4242
- Code(Counter(0)) at (prev + 1, 1) to (start + 8, 15)
4343
- Code(Counter(1)) at (prev + 8, 16) to (start + 3, 6)
@@ -57,27 +57,27 @@ Number of file 0 mappings: 25
5757
= (c5 + (((c2 + c3) + Zero) - c5))
5858
- Code(Zero) at (prev + 1, 27) to (start + 0, 29)
5959
- Code(Expression(21, Add)) at (prev + 1, 14) to (start + 0, 16)
60-
= (c6 + c7)
60+
= (Zero + c7)
6161
- Code(Expression(20, Add)) at (prev + 2, 8) to (start + 0, 15)
62-
= ((c6 + c7) + Zero)
62+
= ((Zero + c7) + Zero)
6363
- Code(Counter(9)) at (prev + 0, 16) to (start + 3, 6)
6464
- Code(Expression(19, Sub)) at (prev + 3, 6) to (start + 0, 7)
65-
= (((c6 + c7) + Zero) - c9)
65+
= (((Zero + c7) + Zero) - c9)
6666
- Code(Expression(18, Add)) at (prev + 1, 11) to (start + 0, 17)
67-
= (c9 + (((c6 + c7) + Zero) - c9))
68-
- Code(Counter(12)) at (prev + 1, 27) to (start + 0, 29)
67+
= (c9 + (((Zero + c7) + Zero) - c9))
68+
- Code(Zero) at (prev + 1, 27) to (start + 0, 29)
6969
- Code(Expression(31, Add)) at (prev + 1, 14) to (start + 0, 16)
7070
= (c10 + c11)
7171
- Code(Expression(30, Add)) at (prev + 2, 8) to (start + 0, 15)
72-
= ((c10 + c11) + c12)
72+
= ((c10 + c11) + Zero)
7373
- Code(Counter(13)) at (prev + 0, 16) to (start + 3, 6)
7474
- Code(Expression(29, Sub)) at (prev + 3, 6) to (start + 0, 7)
75-
= (((c10 + c11) + c12) - c13)
75+
= (((c10 + c11) + Zero) - c13)
7676
- Code(Expression(28, Add)) at (prev + 1, 11) to (start + 0, 17)
77-
= (c13 + (((c10 + c11) + c12) - c13))
77+
= (c13 + (((c10 + c11) + Zero) - c13))
7878
- Code(Counter(16)) at (prev + 1, 27) to (start + 0, 29)
7979
- Code(Expression(34, Add)) at (prev + 1, 14) to (start + 0, 16)
80-
= (c14 + c15)
80+
= (Zero + c15)
8181
- Code(Expression(33, Add)) at (prev + 2, 1) to (start + 0, 2)
82-
= ((c14 + c15) + c16)
82+
= ((Zero + c15) + c16)
8383

tests/mir-opt/const_debuginfo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// unit-test: ConstDebugInfo
2-
// compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN
2+
// compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN -g
33

44
struct Point {
55
x: u32,

tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-abort.diff

+3-10
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
StorageLive(_3);
2323
StorageLive(_4);
2424
_9 = const _;
25-
- _4 = _9;
26-
- _3 = _4;
27-
- _2 = move _3 as &[u32] (PointerCoercion(Unsize));
28-
+ _4 = const {ALLOC0<imm>: &[u32; 3]};
29-
+ _3 = const {ALLOC0<imm>: &[u32; 3]};
30-
+ _2 = const {ALLOC0<imm>: &[u32; 3]} as &[u32] (PointerCoercion(Unsize));
25+
_4 = &(*_9);
26+
_3 = &(*_4);
27+
_2 = move _3 as &[u32] (PointerCoercion(Unsize));
3128
StorageDead(_3);
3229
StorageLive(_6);
3330
_6 = const 1_usize;
@@ -49,9 +46,5 @@
4946
StorageDead(_1);
5047
return;
5148
}
52-
+ }
53-
+
54-
+ ALLOC0 (size: 12, align: 4) {
55-
+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
5649
}
5750

tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-unwind.diff

+3-10
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
StorageLive(_3);
2323
StorageLive(_4);
2424
_9 = const _;
25-
- _4 = _9;
26-
- _3 = _4;
27-
- _2 = move _3 as &[u32] (PointerCoercion(Unsize));
28-
+ _4 = const {ALLOC0<imm>: &[u32; 3]};
29-
+ _3 = const {ALLOC0<imm>: &[u32; 3]};
30-
+ _2 = const {ALLOC0<imm>: &[u32; 3]} as &[u32] (PointerCoercion(Unsize));
25+
_4 = &(*_9);
26+
_3 = &(*_4);
27+
_2 = move _3 as &[u32] (PointerCoercion(Unsize));
3128
StorageDead(_3);
3229
StorageLive(_6);
3330
_6 = const 1_usize;
@@ -49,9 +46,5 @@
4946
StorageDead(_1);
5047
return;
5148
}
52-
+ }
53-
+
54-
+ ALLOC0 (size: 12, align: 4) {
55-
+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
5649
}
5750

tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-abort.diff

+3-10
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
StorageLive(_3);
2323
StorageLive(_4);
2424
_9 = const _;
25-
- _4 = _9;
26-
- _3 = _4;
27-
- _2 = move _3 as &[u32] (PointerCoercion(Unsize));
28-
+ _4 = const {ALLOC0<imm>: &[u32; 3]};
29-
+ _3 = const {ALLOC0<imm>: &[u32; 3]};
30-
+ _2 = const {ALLOC0<imm>: &[u32; 3]} as &[u32] (PointerCoercion(Unsize));
25+
_4 = &(*_9);
26+
_3 = &(*_4);
27+
_2 = move _3 as &[u32] (PointerCoercion(Unsize));
3128
StorageDead(_3);
3229
StorageLive(_6);
3330
_6 = const 1_usize;
@@ -49,9 +46,5 @@
4946
StorageDead(_1);
5047
return;
5148
}
52-
+ }
53-
+
54-
+ ALLOC0 (size: 12, align: 4) {
55-
+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
5649
}
5750

tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-unwind.diff

+3-10
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
StorageLive(_3);
2323
StorageLive(_4);
2424
_9 = const _;
25-
- _4 = _9;
26-
- _3 = _4;
27-
- _2 = move _3 as &[u32] (PointerCoercion(Unsize));
28-
+ _4 = const {ALLOC0<imm>: &[u32; 3]};
29-
+ _3 = const {ALLOC0<imm>: &[u32; 3]};
30-
+ _2 = const {ALLOC0<imm>: &[u32; 3]} as &[u32] (PointerCoercion(Unsize));
25+
_4 = &(*_9);
26+
_3 = &(*_4);
27+
_2 = move _3 as &[u32] (PointerCoercion(Unsize));
3128
StorageDead(_3);
3229
StorageLive(_6);
3330
_6 = const 1_usize;
@@ -49,9 +46,5 @@
4946
StorageDead(_1);
5047
return;
5148
}
52-
+ }
53-
+
54-
+ ALLOC0 (size: 12, align: 4) {
55-
+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
5649
}
5750

tests/mir-opt/const_prop/slice_len.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
fn main() {
88
// CHECK-LABEL: fn main(
99
// CHECK: debug a => [[a:_.*]];
10-
// CHECK: [[slice:_.*]] = const {{.*}} as &[u32] (PointerCoercion(Unsize));
1110
// CHECK: assert(const true,
1211
// CHECK: [[a]] = const 2_u32;
1312
let a = (&[1u32, 2, 3] as &[u32])[1];
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
- // MIR for `main` before SimplifyConstCondition-after-const-prop
2-
+ // MIR for `main` after SimplifyConstCondition-after-const-prop
1+
- // MIR for `main` before SimplifyConstCondition-after-gvn
2+
+ // MIR for `main` after SimplifyConstCondition-after-gvn
33

44
fn main() -> () {
55
let mut _0: ();
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
- // MIR for `main` before SimplifyConstCondition-after-const-prop
2-
+ // MIR for `main` after SimplifyConstCondition-after-const-prop
1+
- // MIR for `main` before SimplifyConstCondition-after-gvn
2+
+ // MIR for `main` after SimplifyConstCondition-after-gvn
33

44
fn main() -> () {
55
let mut _0: ();

0 commit comments

Comments
 (0)