diff options
| author | Ben Kimock <kimockb@gmail.com> | 2024-04-07 16:46:21 -0400 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2024-04-07 16:46:21 -0400 |
| commit | b5b49289e1e67a1b333da3ba6cf374ca11b9d326 (patch) | |
| tree | df232b2c6786c4f87f5e8d389a8dc54e2095ec28 | |
| parent | 339f4be04627f192ba29c33ab2251a582241a112 (diff) | |
Only traverse mono-reachable blocks in cg_clif
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/base.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs index 1307a62a60d..771e5b21958 100644 --- a/compiler/rustc_codegen_cranelift/src/base.rs +++ b/compiler/rustc_codegen_cranelift/src/base.rs @@ -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); |
