pub struct LoweredFunction {
pub name: String,
pub signature: LoweredSignature,
pub blocks: Vec<LoweredBlock>,
pub entry: LoweredBlockId,
}Expand description
A complete lowered function, ready for the wave 3
LoweredFunction -> pliron::Operation converter.
Fields§
§name: StringFunction name. Used as the PTX entry symbol.
signature: LoweredSignatureSignature (param + return types).
blocks: Vec<LoweredBlock>Blocks in order. The entry block is identified by entry.
entry: LoweredBlockIdEntry block id.
Implementations§
Source§impl LoweredFunction
impl LoweredFunction
Sourcepub fn new(name: impl Into<String>, signature: LoweredSignature) -> Self
pub fn new(name: impl Into<String>, signature: LoweredSignature) -> Self
Construct an empty function with the given name and signature.
Sourcepub fn block(&self, id: LoweredBlockId) -> Option<&LoweredBlock>
pub fn block(&self, id: LoweredBlockId) -> Option<&LoweredBlock>
Lookup a block by id.
Sourcepub fn is_well_formed(&self) -> bool
pub fn is_well_formed(&self) -> bool
True if every block ends in a terminator.
Trait Implementations§
Source§impl Clone for LoweredFunction
impl Clone for LoweredFunction
Source§fn clone(&self) -> LoweredFunction
fn clone(&self) -> LoweredFunction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoweredFunction
impl Debug for LoweredFunction
Source§impl PartialEq for LoweredFunction
impl PartialEq for LoweredFunction
Source§fn eq(&self, other: &LoweredFunction) -> bool
fn eq(&self, other: &LoweredFunction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LoweredFunction
Auto Trait Implementations§
impl Freeze for LoweredFunction
impl RefUnwindSafe for LoweredFunction
impl Send for LoweredFunction
impl Sync for LoweredFunction
impl Unpin for LoweredFunction
impl UnsafeUnpin for LoweredFunction
impl UnwindSafe for LoweredFunction
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§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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