Struct orzir_core::Region
source · pub struct Region { /* private fields */ }Expand description
A region in the IR.
Implementations§
source§impl Region
impl Region
pub fn new( ctx: &mut Context, kind: RegionKind, parent_op: ArenaPtr<OpObj>, index: usize ) -> ArenaPtr<Region>
pub fn layout(&self) -> &List<ArenaPtr<Block>, BlockNode>
pub fn layout_mut(&mut self) -> &mut List<ArenaPtr<Block>, BlockNode>
pub fn kind(&self) -> RegionKind
pub fn set_kind(&mut self, kind: RegionKind)
pub fn parent_op(&self) -> ArenaPtr<OpObj>
pub fn index(&self) -> usize
pub fn self_ptr(&self) -> ArenaPtr<Self>
pub fn parent_region(&self, ctx: &Context) -> Option<ArenaPtr<Region>>
sourcepub fn is_ancestor(&self, ctx: &Context, other: ArenaPtr<Region>) -> bool
pub fn is_ancestor(&self, ctx: &Context, other: ArenaPtr<Region>) -> bool
Check if this region is an ancestor of the other region.
pub fn register_symbol(&mut self, symbol: Symbol, op: ArenaPtr<OpObj>)
pub fn lookup_symbol( &self, ctx: &Context, name: &str ) -> Option<ArenaPtr<OpObj>>
Trait Implementations§
source§impl Print for Region
impl Print for Region
fn print(&self, ctx: &Context, state: &mut PrintState) -> PrintResult<()>
source§impl RunVerifiers for Region
impl RunVerifiers for Region
fn run_verifiers(&self, _ctx: &Context) -> VerifyResult<()>
Auto Trait Implementations§
impl !Freeze for Region
impl !RefUnwindSafe for Region
impl !Send for Region
impl !Sync for Region
impl Unpin for Region
impl !UnwindSafe for Region
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.