Enum quil_rs::program::analysis::BasicBlockTerminator
source · pub enum BasicBlockTerminator<'p> {
ConditionalJump {
condition: &'p MemoryReference,
target: &'p Target,
jump_if_condition_zero: bool,
},
Continue,
Jump {
target: &'p Target,
},
Halt,
}
Expand description
The terminator of a basic block, which determines the control flow to the next basic block.
Variants§
Implementations§
source§impl BasicBlockTerminator<'_>
impl BasicBlockTerminator<'_>
sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
Returns true
if the terminator is dynamic, i.e. JUMP-WHEN
or JUMP-UNLESS
.
Dynamic terminators are those that can change the control flow based on the state of the
program at runtime, as opposed to static terminators like JUMP
and HALT
.
pub fn into_instruction(self) -> Option<Instruction>
Trait Implementations§
source§impl<'p> Clone for BasicBlockTerminator<'p>
impl<'p> Clone for BasicBlockTerminator<'p>
source§fn clone(&self) -> BasicBlockTerminator<'p>
fn clone(&self) -> BasicBlockTerminator<'p>
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<'p> Debug for BasicBlockTerminator<'p>
impl<'p> Debug for BasicBlockTerminator<'p>
source§impl<'p> Default for BasicBlockTerminator<'p>
impl<'p> Default for BasicBlockTerminator<'p>
source§fn default() -> BasicBlockTerminator<'p>
fn default() -> BasicBlockTerminator<'p>
Returns the “default value” for a type. Read more
source§impl<'p> From<&'p BasicBlockTerminatorOwned> for BasicBlockTerminator<'p>
impl<'p> From<&'p BasicBlockTerminatorOwned> for BasicBlockTerminator<'p>
source§fn from(value: &'p BasicBlockTerminatorOwned) -> Self
fn from(value: &'p BasicBlockTerminatorOwned) -> Self
Converts to this type from the input type.
source§impl<'p> From<BasicBlockTerminator<'p>> for BasicBlockTerminatorOwned
impl<'p> From<BasicBlockTerminator<'p>> for BasicBlockTerminatorOwned
source§fn from(value: BasicBlockTerminator<'_>) -> Self
fn from(value: BasicBlockTerminator<'_>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'p> Freeze for BasicBlockTerminator<'p>
impl<'p> RefUnwindSafe for BasicBlockTerminator<'p>
impl<'p> Send for BasicBlockTerminator<'p>
impl<'p> Sync for BasicBlockTerminator<'p>
impl<'p> Unpin for BasicBlockTerminator<'p>
impl<'p> UnwindSafe for BasicBlockTerminator<'p>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.