Struct cranelift_codegen::machinst::blockorder::BlockLoweringOrder
source · [−]pub struct BlockLoweringOrder { /* private fields */ }
Expand description
Mapping from CLIF BBs to VCode BBs.
Implementations
sourceimpl BlockLoweringOrder
impl BlockLoweringOrder
sourcepub fn new(f: &Function) -> BlockLoweringOrder
pub fn new(f: &Function) -> BlockLoweringOrder
Compute and return a lowered block order for f
.
sourcepub fn lowered_order(&self) -> &[LoweredBlock]
pub fn lowered_order(&self) -> &[LoweredBlock]
Get the lowered order of blocks.
sourcepub fn succs(&self, block: BlockIndex) -> &[(Inst, LoweredBlock)]
pub fn succs(&self, block: BlockIndex) -> &[(Inst, LoweredBlock)]
Get the successors for a lowered block, by index in lowered_order()
’s
returned slice. Each successsor is paired with the edge-instruction
(branch) corresponding to this edge.
sourcepub fn succ_indices(&self, block: BlockIndex) -> &[(Inst, BlockIndex)]
pub fn succ_indices(&self, block: BlockIndex) -> &[(Inst, BlockIndex)]
Get the successor indices for a lowered block.
sourcepub fn lowered_block_for_bb(&self, bb: Block) -> Option<BlockIndex>
pub fn lowered_block_for_bb(&self, bb: Block) -> Option<BlockIndex>
Get the lowered block index containing a CLIF block, if any. (May not be present if the original CLIF block was unreachable.)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BlockLoweringOrder
impl Send for BlockLoweringOrder
impl Sync for BlockLoweringOrder
impl Unpin for BlockLoweringOrder
impl UnwindSafe for BlockLoweringOrder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more