Skip to content

Commit b5b4928

Browse files
committed
Only traverse mono-reachable blocks in cg_clif
1 parent 339f4be commit b5b4928

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_codegen_cranelift/src

1 file changed

+1
-1
lines changed

compiler/rustc_codegen_cranelift/src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
267267
.generic_activity("codegen prelude")
268268
.run(|| crate::abi::codegen_fn_prelude(fx, start_block));
269269

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

0 commit comments

Comments
 (0)