Trait orzir_core::RegionInterface
source · pub trait RegionInterface {
// Required methods
fn num_regions(&self) -> usize;
fn get_region(&self, index: usize) -> Option<ArenaPtr<Region>>;
fn set_region(
&mut self,
index: usize,
region: ArenaPtr<Region>
) -> Option<ArenaPtr<Region>>;
// Provided methods
fn regions(&self) -> Vec<ArenaPtr<Region>> { ... }
fn get_region_kind(&self, ctx: &Context, index: usize) -> RegionKind { ... }
fn has_ssa_dominance(&self, ctx: &Context, index: usize) -> bool { ... }
}Expand description
Builtin region interface.
This trait provides methods to interact with regions. This is set to be a mandatory interface for all operations for performance reasons.
Required Methods§
sourcefn num_regions(&self) -> usize
fn num_regions(&self) -> usize
Get the number of regions.
Provided Methods§
sourcefn get_region_kind(&self, ctx: &Context, index: usize) -> RegionKind
fn get_region_kind(&self, ctx: &Context, index: usize) -> RegionKind
Get the region kind at the given index.
sourcefn has_ssa_dominance(&self, ctx: &Context, index: usize) -> bool
fn has_ssa_dominance(&self, ctx: &Context, index: usize) -> bool
Check if the region has SSA dominance.