Skip to content

Commit a35a84a

Browse files
committed
Perform jump-threading inside coroutines.
1 parent 5ad0a9c commit a35a84a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/rustc_mir_transform/src/jump_threading.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use rustc_middle::ty::{self, ScalarInt, TyCtxt};
4949
use rustc_mir_dataflow::lattice::HasBottom;
5050
use rustc_mir_dataflow::value_analysis::{Map, PlaceIndex, State, TrackElem};
5151
use rustc_span::DUMMY_SP;
52-
use tracing::{debug, instrument, trace};
52+
use tracing::{debug, instrument};
5353

5454
use crate::cost_checker::CostChecker;
5555

@@ -69,12 +69,6 @@ impl<'tcx> crate::MirPass<'tcx> for JumpThreading {
6969
let def_id = body.source.def_id();
7070
debug!(?def_id);
7171

72-
// Optimizing coroutines creates query cycles.
73-
if tcx.is_coroutine(def_id) {
74-
trace!("Skipped for coroutine {:?}", def_id);
75-
return;
76-
}
77-
7872
let typing_env = body.typing_env(tcx);
7973
let arena = &DroplessArena::default();
8074
let mut finder = TOFinder {

0 commit comments

Comments
 (0)