Skip to content

Commit

Permalink
Only traverse mono-reachable blocks in cg_clif
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Apr 7, 2024
1 parent 339f4be commit b5b4928
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
.generic_activity("codegen prelude")
.run(|| crate::abi::codegen_fn_prelude(fx, start_block));

for (bb, bb_data) in fx.mir.basic_blocks.iter_enumerated() {
for (bb, bb_data) in traversal::mono_reachable(fx.mir, fx.tcx, fx.instance) {
let block = fx.get_block(bb);
fx.bcx.switch_to_block(block);

Expand Down

0 comments on commit b5b4928

Please sign in to comment.