pub struct AtomicRmwOp { /* private fields */ }Expand description
Equivalent to LLVM’s atomicrmw: atomically applies kind to the value at
a pointer and returns the old value.
§Operands
| operand | description |
|---|---|
ptr | PointerType |
val | value to combine with the one in memory |
§Result(s):
| result | description |
|---|---|
res | the old value (same type as val) |
§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 |
|---|---|---|
llvm_rmw_kind | ATTR_KEY_LLVM_RMW_KIND | AtomicRmwKindAttr |
llvm_rmw_ordering | ATTR_KEY_LLVM_RMW_ORDERING | AtomicOrderingAttr |
llvm_rmw_syncscope | ATTR_KEY_LLVM_RMW_SYNCSCOPE | StringAttr |
Implementations§
Source§impl AtomicRmwOp
impl AtomicRmwOp
pub fn get_operand_ptr(&self, ctx: &Context) -> Value
pub fn get_operand_val(&self, ctx: &Context) -> Value
Source§impl AtomicRmwOp
impl AtomicRmwOp
Sourcepub fn get_attr_llvm_rmw_kind<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, AtomicRmwKindAttr>>
pub fn get_attr_llvm_rmw_kind<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, AtomicRmwKindAttr>>
Get a Ref to the value of the attribute named llvm_rmw_kind.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_llvm_rmw_kind(&self, ctx: &Context, value: AtomicRmwKindAttr)
pub fn set_attr_llvm_rmw_kind(&self, ctx: &Context, value: AtomicRmwKindAttr)
Set the value of the attribute named llvm_rmw_kind.
Sourcepub fn get_attr_llvm_rmw_ordering<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, AtomicOrderingAttr>>
pub fn get_attr_llvm_rmw_ordering<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, AtomicOrderingAttr>>
Get a Ref to the value of the attribute named llvm_rmw_ordering.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_llvm_rmw_ordering(
&self,
ctx: &Context,
value: AtomicOrderingAttr,
)
pub fn set_attr_llvm_rmw_ordering( &self, ctx: &Context, value: AtomicOrderingAttr, )
Set the value of the attribute named llvm_rmw_ordering.
Sourcepub fn get_attr_llvm_rmw_syncscope<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, StringAttr>>
pub fn get_attr_llvm_rmw_syncscope<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, StringAttr>>
Get a Ref to the value of the attribute named llvm_rmw_syncscope.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_llvm_rmw_syncscope(&self, ctx: &Context, value: StringAttr)
pub fn set_attr_llvm_rmw_syncscope(&self, ctx: &Context, value: StringAttr)
Set the value of the attribute named llvm_rmw_syncscope.
Source§impl AtomicRmwOp
impl AtomicRmwOp
Sourcepub fn new(
ctx: &mut Context,
ptr: Value,
val: Value,
kind: AtomicRmwKindAttr,
ordering: AtomicOrderingAttr,
syncscope: Option<String>,
) -> Self
pub fn new( ctx: &mut Context, ptr: Value, val: Value, kind: AtomicRmwKindAttr, ordering: AtomicOrderingAttr, syncscope: Option<String>, ) -> Self
Create a new AtomicRmwOp. syncscope is None for the system scope.
Trait Implementations§
Source§impl Clone for AtomicRmwOp
impl Clone for AtomicRmwOp
Source§fn clone(&self) -> AtomicRmwOp
fn clone(&self) -> AtomicRmwOp
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 AtomicRmwOp
impl Hash for AtomicRmwOp
Source§impl NOpdsInterface<2> for AtomicRmwOp
impl NOpdsInterface<2> for AtomicRmwOp
Source§fn operand_type_i(&self, ctx: &Context, i: LessThanN<N>) -> TypeHandle
fn operand_type_i(&self, ctx: &Context, i: LessThanN<N>) -> TypeHandle
i’th operand.Source§impl OneResultInterface for AtomicRmwOp
impl OneResultInterface for AtomicRmwOp
Source§fn result_type(&self, ctx: &Context) -> TypeHandle
fn result_type(&self, ctx: &Context) -> TypeHandle
Source§impl Op for AtomicRmwOp
impl Op for AtomicRmwOp
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 AtomicRmwOp
impl Parsable for AtomicRmwOp
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 AtomicRmwOp
impl PartialEq for AtomicRmwOp
Source§fn eq(&self, other: &AtomicRmwOp) -> bool
fn eq(&self, other: &AtomicRmwOp) -> bool
self and other values to be equal, and is used by ==.Source§impl Printable for AtomicRmwOp
impl Printable for AtomicRmwOp
impl Copy for AtomicRmwOp
impl Eq for AtomicRmwOp
impl OperandNOfType<0, PointerType> for AtomicRmwOp
impl StructuralPartialEq for AtomicRmwOp
Auto Trait Implementations§
impl Freeze for AtomicRmwOp
impl !RefUnwindSafe for AtomicRmwOp
impl Send for AtomicRmwOp
impl Sync for AtomicRmwOp
impl Unpin for AtomicRmwOp
impl UnsafeUnpin for AtomicRmwOp
impl !UnwindSafe for AtomicRmwOp
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.