[−][src]Struct souper_ir::ast::Phi
A phi node.
If a phi's block
has n
predecessors, then the length of values
must be
n
.
All phi nodes associated with a particular block
will have their i
th
value selected when control flow comes from block
's i
th predecessor. For
example, given:
%bb = block 3
%a = phi %bb, 1, 2, 3
%b = phi %bb, 4, 5, 6
%c = phi %bb, 7, 8, 9
If the basic block %bb
has three control-flow predecessors. If it is
entered via its first predecessor, then %a == 1
, %b == 4
, and %c == 7
. If it is entered via its second predecessor, then %a == 2
, %b == 5
,
and %c == 8
. Finally, if it is entered via its third predecessor, then %a == 3
, %b == 6
, and %c == 9
.
Fields
block: BlockId
The basic block that this phi node is contained within.
values: Vec<Operand>
The potential values for this phi node.
Trait Implementations
impl Clone for Phi
[src]
impl Debug for Phi
[src]
impl From<Phi> for AssignmentRhs
[src]
impl Parse for Phi
[src]
impl Peek for Phi
[src]
Auto Trait Implementations
impl RefUnwindSafe for Phi
impl Send for Phi
impl Sync for Phi
impl Unpin for Phi
impl UnwindSafe for Phi
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,