pub enum Node {
Entry(usize),
Normal(usize, Option<NodePtr>, Option<NodePtr>, InstPtr),
Phi(usize, Vec<(BBPtr, NodePtr)>, EffectRange),
}Expand description
Memory SSA node. Function in Node does not maintain use-def chain.
Variants§
Entry(usize)
Entry(id) represents the memory state at the beginning of the function.
Normal(usize, Option<NodePtr>, Option<NodePtr>, InstPtr)
Normal(id, use_node, def_node, inst) represents a memory state after an instruction.
Phi(usize, Vec<(BBPtr, NodePtr)>, EffectRange)
Phi(id, args, range) represents a phi node.
Implementations§
Source§impl Node
impl Node
Sourcepub fn get_use_node(&self) -> NodePtr
pub fn get_use_node(&self) -> NodePtr
Get use node. Use node is the node that is read from.
Sourcepub fn get_used_node(&self) -> Vec<NodePtr> ⓘ
pub fn get_used_node(&self) -> Vec<NodePtr> ⓘ
Get used nodes. Used nodes contains both use and def nodes.
Sourcepub fn get_used_node_mut(&mut self) -> Vec<&mut NodePtr> ⓘ
pub fn get_used_node_mut(&mut self) -> Vec<&mut NodePtr> ⓘ
Get mutable used nodes. Used nodes contains both use and def nodes.
Auto Trait Implementations§
impl Freeze for Node
impl !RefUnwindSafe for Node
impl !Send for Node
impl !Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more