Skip to content

Commit 2446b17

Browse files
committed
Move is_cfg_cyclic from Body to BasicBlocks
1 parent c9dd1d9 commit 2446b17

File tree

2 files changed

+1
-7
lines changed
  • compiler

2 files changed

+1
-7
lines changed

compiler/rustc_middle/src/mir/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,6 @@ impl<'tcx> Body<'tcx> {
343343
self.basic_blocks.as_mut()
344344
}
345345

346-
/// Returns `true` if a cycle exists in the control-flow graph that is reachable from the
347-
/// `START_BLOCK`.
348-
pub fn is_cfg_cyclic(&self) -> bool {
349-
self.basic_blocks.is_cfg_cyclic()
350-
}
351-
352346
#[inline]
353347
pub fn local_kind(&self, local: Local) -> LocalKind {
354348
let index = local.as_usize();

compiler/rustc_mir_dataflow/src/framework/engine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ where
101101
// transfer function for each block exactly once (assuming that we process blocks in RPO).
102102
//
103103
// In this case, there's no need to compute the block transfer functions ahead of time.
104-
if !body.is_cfg_cyclic() {
104+
if !body.basic_blocks.is_cfg_cyclic() {
105105
return Self::new(tcx, body, analysis, None);
106106
}
107107

0 commit comments

Comments
 (0)