File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
compiler/rustc_mir_transform/src Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,10 @@ impl SsaLocals {
78
78
visitor. assignments [ local] = Set1 :: One ( LocationExtended :: Arg ) ;
79
79
}
80
80
81
- if body. basic_blocks . len ( ) > 2 {
82
- for ( bb, data) in traversal:: reverse_postorder ( body) {
83
- visitor. visit_basic_block_data ( bb, data) ;
84
- }
85
- } else {
86
- for ( bb, data) in body. basic_blocks . iter_enumerated ( ) {
87
- visitor. visit_basic_block_data ( bb, data) ;
88
- }
81
+ // For SSA assignments, a RPO visit will see the assignment before it sees any use.
82
+ // We only visit reachable nodes: computing `dominates` on an unreachable node ICEs.
83
+ for ( bb, data) in traversal:: reverse_postorder ( body) {
84
+ visitor. visit_basic_block_data ( bb, data) ;
89
85
}
90
86
91
87
for var_debug_info in & body. var_debug_info {
You can’t perform that action at this time.
0 commit comments