We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 381ad53 commit 5065da2Copy full SHA for 5065da2
crates/rustc_codegen_spirv/src/linker/inline.rs
@@ -521,7 +521,14 @@ fn fuse_trivial_branches(function: &mut Function) {
521
}
522
523
function.blocks.retain(|b| !b.instructions.is_empty());
524
- apply_rewrite_rules(&rewrite_rules, &mut function.blocks);
+ // Calculate a closure, as these rules can be transitive
525
+ let mut rewrite_rules_new = rewrite_rules.clone();
526
+ for value in rewrite_rules_new.values_mut() {
527
+ while let Some(next) = rewrite_rules.get(value) {
528
+ *value = *next;
529
+ }
530
531
+ apply_rewrite_rules(&rewrite_rules_new, &mut function.blocks);
532
533
534
fn compute_outgoing_1to1_branches(blocks: &[Block]) -> Vec<Option<usize>> {
0 commit comments