Struct spirt::cfg::ControlInst
source · pub struct ControlInst {
pub attrs: AttrSet,
pub kind: ControlInstKind,
pub inputs: SmallVec<[Value; 2]>,
pub targets: SmallVec<[ControlRegion; 4]>,
pub target_inputs: IndexMap<ControlRegion, SmallVec<[Value; 2]>, BuildHasherDefault<FxHasher>>,
}
Fields§
§attrs: AttrSet
§kind: ControlInstKind
§inputs: SmallVec<[Value; 2]>
§targets: SmallVec<[ControlRegion; 4]>
§target_inputs: IndexMap<ControlRegion, SmallVec<[Value; 2]>, BuildHasherDefault<FxHasher>>
target_inputs[region][input_idx]
is the Value
that
Value::ControlRegionInput { region, input_idx }
will get on entry,
where region
must be appear at least once in targets
- this is a
separate map instead of being part of targets
because it reflects the
limitations of φ (“phi”) nodes, which (unlike “basic block arguments”)
cannot tell apart multiple edges with the same source and destination.
Trait Implementations§
source§impl Clone for ControlInst
impl Clone for ControlInst
source§fn clone(&self) -> ControlInst
fn clone(&self) -> ControlInst
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl InnerInPlaceTransform for ControlInst
impl InnerInPlaceTransform for ControlInst
fn inner_in_place_transform_with(&mut self, transformer: &mut impl Transformer)
source§impl InnerVisit for ControlInst
impl InnerVisit for ControlInst
fn inner_visit_with<'a>(&'a self, visitor: &mut impl Visitor<'a>)
Auto Trait Implementations§
impl RefUnwindSafe for ControlInst
impl Send for ControlInst
impl Sync for ControlInst
impl Unpin for ControlInst
impl UnwindSafe for ControlInst
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