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 c048909 commit a7cc8dbCopy full SHA for a7cc8db
crates/rustc_codegen_spirv/src/linker/inline.rs
@@ -519,7 +519,14 @@ fn fuse_trivial_branches(function: &mut Function) {
519
}
520
521
function.blocks.retain(|b| !b.instructions.is_empty());
522
- apply_rewrite_rules(&rewrite_rules, &mut function.blocks);
+ // Calculate a closure, as these rules can be transitive
523
+ let mut rewrite_rules_new = rewrite_rules.clone();
524
+ for value in rewrite_rules_new.values_mut() {
525
+ while let Some(next) = rewrite_rules.get(value) {
526
+ *value = *next;
527
+ }
528
529
+ apply_rewrite_rules(&rewrite_rules_new, &mut function.blocks);
530
531
532
fn compute_outgoing_1to1_branches(blocks: &[Block]) -> Vec<Option<usize>> {
0 commit comments