File tree 1 file changed +0
-5
lines changed
compiler/rustc_mir_transform/src
1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ use crate::MirPass;
24
24
25
25
// These constants are somewhat random guesses and have not been optimized.
26
26
// If `tcx.sess.mir_opt_level() >= 4`, we ignore the limits (this can become very expensive).
27
- const BLOCK_LIMIT : usize = 100 ;
28
27
const PLACE_LIMIT : usize = 100 ;
29
28
30
29
pub struct ConstProp ;
@@ -37,10 +36,6 @@ impl<'tcx> MirPass<'tcx> for ConstProp {
37
36
#[ instrument( skip_all level = "debug" ) ]
38
37
fn run_pass ( & self , tcx : TyCtxt < ' tcx > , body : & mut Body < ' tcx > ) {
39
38
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
- }
44
39
45
40
// We want to have a somewhat linear runtime w.r.t. the number of statements/terminators.
46
41
// Let's call this number `n`. Dataflow analysis has `O(h*n)` transfer function
You can’t perform that action at this time.
0 commit comments