pub struct InlineAsmOp { /* private fields */ }Expand description
Equivalent to LLVM’s inline assembly call. The template and constraint
strings follow LLVM’s inline-asm syntax; convergent marks asm that must
not be reordered across divergent control flow (e.g. warp-synchronous PTX).
§Operands
| operand | description |
|---|---|
inputs | input operands to the inline asm |
§Result(s):
| result | description |
|---|---|
res | the asm result (a void type when there is none) |
§Attribute(s):
Note: Only attributes defined directly as part of this operation are listed here. There may be others, not listed here, defined by interface implementations.
| Name | Static Name Identifier | Type |
|---|---|---|
inline_asm_template | ATTR_KEY_INLINE_ASM_TEMPLATE | StringAttr |
inline_asm_constraints | ATTR_KEY_INLINE_ASM_CONSTRAINTS | StringAttr |
inline_asm_convergent | ATTR_KEY_INLINE_ASM_CONVERGENT | BoolAttr |
Implementations§
Source§impl InlineAsmOp
impl InlineAsmOp
Sourcepub fn get_attr_inline_asm_template<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, StringAttr>>
pub fn get_attr_inline_asm_template<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, StringAttr>>
Get a Ref to the value of the attribute named inline_asm_template.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_inline_asm_template(&self, ctx: &Context, value: StringAttr)
pub fn set_attr_inline_asm_template(&self, ctx: &Context, value: StringAttr)
Set the value of the attribute named inline_asm_template.
Sourcepub fn get_attr_inline_asm_constraints<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, StringAttr>>
pub fn get_attr_inline_asm_constraints<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, StringAttr>>
Get a Ref to the value of the attribute named inline_asm_constraints.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_inline_asm_constraints(&self, ctx: &Context, value: StringAttr)
pub fn set_attr_inline_asm_constraints(&self, ctx: &Context, value: StringAttr)
Set the value of the attribute named inline_asm_constraints.
Sourcepub fn get_attr_inline_asm_convergent<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, BoolAttr>>
pub fn get_attr_inline_asm_convergent<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, BoolAttr>>
Get a Ref to the value of the attribute named inline_asm_convergent.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_inline_asm_convergent(&self, ctx: &Context, value: BoolAttr)
pub fn set_attr_inline_asm_convergent(&self, ctx: &Context, value: BoolAttr)
Set the value of the attribute named inline_asm_convergent.
Source§impl InlineAsmOp
impl InlineAsmOp
Sourcepub fn new(
ctx: &mut Context,
result_ty: TypeHandle,
inputs: Vec<Value>,
asm_template: &str,
constraints: &str,
convergent: bool,
) -> Self
pub fn new( ctx: &mut Context, result_ty: TypeHandle, inputs: Vec<Value>, asm_template: &str, constraints: &str, convergent: bool, ) -> Self
Create a new InlineAsmOp. Use a void result type for asm with no result value.
Trait Implementations§
Source§impl Clone for InlineAsmOp
impl Clone for InlineAsmOp
Source§fn clone(&self) -> InlineAsmOp
fn clone(&self) -> InlineAsmOp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Hash for InlineAsmOp
impl Hash for InlineAsmOp
Source§impl OneResultInterface for InlineAsmOp
impl OneResultInterface for InlineAsmOp
Source§fn result_type(&self, ctx: &Context) -> TypeHandle
fn result_type(&self, ctx: &Context) -> TypeHandle
Source§impl Op for InlineAsmOp
impl Op for InlineAsmOp
Source§fn get_operation(&self) -> Ptr<Operation>
fn get_operation(&self) -> Ptr<Operation>
Source§fn get_opid_static() -> OpId
fn get_opid_static() -> OpId
Source§fn get_concrete_op_info() -> (fn(Ptr<Operation>) -> OpBox, TypeId)where
Self: Sized,
fn get_concrete_op_info() -> (fn(Ptr<Operation>) -> OpBox, TypeId)where
Self: Sized,
Source§impl Parsable for InlineAsmOp
impl Parsable for InlineAsmOp
Source§type Arg = Vec<(Identifier, Location)>
type Arg = Vec<(Identifier, Location)>
Source§fn parse<'__pliron_parse>(
state_stream: &mut StateStream<'__pliron_parse>,
arg: Self::Arg,
) -> ParseResult<'__pliron_parse, Self::Parsed>
fn parse<'__pliron_parse>( state_stream: &mut StateStream<'__pliron_parse>, arg: Self::Arg, ) -> ParseResult<'__pliron_parse, Self::Parsed>
into on [Parser::parse_stream] to get the final ParseResult.
Use state_stream.state as necessary.Source§impl PartialEq for InlineAsmOp
impl PartialEq for InlineAsmOp
Source§fn eq(&self, other: &InlineAsmOp) -> bool
fn eq(&self, other: &InlineAsmOp) -> bool
self and other values to be equal, and is used by ==.Source§impl Printable for InlineAsmOp
impl Printable for InlineAsmOp
impl Copy for InlineAsmOp
impl Eq for InlineAsmOp
impl StructuralPartialEq for InlineAsmOp
Auto Trait Implementations§
impl Freeze for InlineAsmOp
impl !RefUnwindSafe for InlineAsmOp
impl Send for InlineAsmOp
impl Sync for InlineAsmOp
impl Unpin for InlineAsmOp
impl UnsafeUnpin for InlineAsmOp
impl !UnwindSafe for InlineAsmOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.