Skip to content

Commit 528aee7

Browse files
committed
Remove bound on number of basic blocks.
1 parent 869d997 commit 528aee7

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

compiler/rustc_mir_transform/src/dataflow_const_prop.rs

-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use crate::MirPass;
2424

2525
// These constants are somewhat random guesses and have not been optimized.
2626
// If `tcx.sess.mir_opt_level() >= 4`, we ignore the limits (this can become very expensive).
27-
const BLOCK_LIMIT: usize = 100;
2827
const PLACE_LIMIT: usize = 100;
2928

3029
pub struct ConstProp;
@@ -37,10 +36,6 @@ impl<'tcx> MirPass<'tcx> for ConstProp {
3736
#[instrument(skip_all level = "debug")]
3837
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
3938
debug!(def_id = ?body.source.def_id());
40-
if tcx.sess.mir_opt_level() < 4 && body.basic_blocks.len() > BLOCK_LIMIT {
41-
debug!("aborted dataflow const prop due too many basic blocks");
42-
return;
43-
}
4439

4540
// We want to have a somewhat linear runtime w.r.t. the number of statements/terminators.
4641
// Let's call this number `n`. Dataflow analysis has `O(h*n)` transfer function

0 commit comments

Comments
 (0)