mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-08 13:02:50 +00:00
Only visit reachable nodes in SsaLocals.
This commit is contained in:
parent
255ca18454
commit
3816c15b88
@ -78,14 +78,10 @@ impl SsaLocals {
|
|||||||
visitor.assignments[local] = Set1::One(LocationExtended::Arg);
|
visitor.assignments[local] = Set1::One(LocationExtended::Arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if body.basic_blocks.len() > 2 {
|
// For SSA assignments, a RPO visit will see the assignment before it sees any use.
|
||||||
for (bb, data) in traversal::reverse_postorder(body) {
|
// We only visit reachable nodes: computing `dominates` on an unreachable node ICEs.
|
||||||
visitor.visit_basic_block_data(bb, data);
|
for (bb, data) in traversal::reverse_postorder(body) {
|
||||||
}
|
visitor.visit_basic_block_data(bb, data);
|
||||||
} else {
|
|
||||||
for (bb, data) in body.basic_blocks.iter_enumerated() {
|
|
||||||
visitor.visit_basic_block_data(bb, data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for var_debug_info in &body.var_debug_info {
|
for var_debug_info in &body.var_debug_info {
|
||||||
|
Loading…
Reference in New Issue
Block a user