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 |
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.
Source§impl AtomicRmwOp
impl AtomicRmwOp
Sourcepub fn new(
ctx: &mut Context,
ptr: Value,
val: Value,
kind: AtomicRmwKindAttr,
ordering: AtomicOrderingAttr,
syncscope: SyncScopeAttr,
) -> Self
pub fn new( ctx: &mut Context, ptr: Value, val: Value, kind: AtomicRmwKindAttr, ordering: AtomicOrderingAttr, syncscope: SyncScopeAttr, ) -> Self
Create a new AtomicRmwOp.
Trait Implementations§
Source§impl Clone for AtomicRmwOp
impl Clone for AtomicRmwOp
Source§fn clone(&self) -> AtomicRmwOp
fn clone(&self) -> AtomicRmwOp
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 moreimpl Copy for AtomicRmwOp
impl Eq for AtomicRmwOp
Source§impl Hash for AtomicRmwOp
impl Hash for AtomicRmwOp
Source§impl NOpdsInterface<2> for AtomicRmwOp
impl NOpdsInterface<2> for AtomicRmwOp
§fn get_operand_i(&self, ctx: &Context, i: LessThanN<N>) -> Value
fn get_operand_i(&self, ctx: &Context, i: LessThanN<N>) -> Value
Get the
i’th operand.§fn operand_type_i(&self, ctx: &Context, i: LessThanN<N>) -> TypeHandle
fn operand_type_i(&self, ctx: &Context, i: LessThanN<N>) -> TypeHandle
Get the type of the
i’th operand.Source§impl OneResultInterface for AtomicRmwOp
impl OneResultInterface for AtomicRmwOp
§fn get_result(&self, ctx: &Context) -> Value
fn get_result(&self, ctx: &Context) -> Value
Get the single result defined by this [Op].
§fn result_type(&self, ctx: &Context) -> TypeHandle
fn result_type(&self, ctx: &Context) -> TypeHandle
Get the type of the single result defined by this [Op].
Source§impl Op for AtomicRmwOp
impl Op for AtomicRmwOp
Source§fn get_operation(&self) -> Ptr<Operation>
fn get_operation(&self) -> Ptr<Operation>
Get the underlying IR Operation
Source§fn get_opid_static() -> OpId
fn get_opid_static() -> OpId
Get this Op’s OpId, without self reference.
§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,
Get details about the concrete Op type.
impl OperandNOfType<0, PointerType> for AtomicRmwOp
Source§impl Parsable for AtomicRmwOp
impl Parsable for AtomicRmwOp
Source§type Arg = Vec<(Identifier, Location)>
type Arg = Vec<(Identifier, Location)>
Type of the argument that must be passed to the parser.
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>
Define a parser using existing combinators and call
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
Tests for
self and other values to be equal, and is used by ==.Source§impl Printable for AtomicRmwOp
impl Printable for AtomicRmwOp
impl StructuralPartialEq for AtomicRmwOp
Source§impl SyncScopeInterface for AtomicRmwOp
impl SyncScopeInterface for AtomicRmwOp
Source§fn syncscope(&self, ctx: &Context) -> SyncScopeAttrwhere
Self: Sized,
fn syncscope(&self, ctx: &Context) -> SyncScopeAttrwhere
Self: Sized,
Get the synchronization scope of this [Op].
Source§fn set_syncscope(&self, ctx: &Context, syncscope: SyncScopeAttr)where
Self: Sized,
fn set_syncscope(&self, ctx: &Context, syncscope: SyncScopeAttr)where
Self: Sized,
Set the synchronization scope of this [Op].
Auto Trait Implementations§
impl !RefUnwindSafe for AtomicRmwOp
impl !UnwindSafe for AtomicRmwOp
impl Freeze for AtomicRmwOp
impl Send for AtomicRmwOp
impl Sync for AtomicRmwOp
impl Unpin for AtomicRmwOp
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.