pub struct BlockAddressOp { /* private fields */ }Expand description
Similar to MLIR’s LLVM dialect llvm.blockaddress.
Creates an SSA value containing the address of a tagged block in a function.
§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_block_address_function | ATTR_KEY_LLVM_BLOCK_ADDRESS_FUNCTION | [IdentifierAttr] |
llvm_block_address_tag | ATTR_KEY_LLVM_BLOCK_ADDRESS_TAG | [IntegerAttr] |
Implementations§
Source§impl BlockAddressOp
impl BlockAddressOp
Sourcepub fn get_attr_llvm_block_address_function<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, IdentifierAttr>>
pub fn get_attr_llvm_block_address_function<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, IdentifierAttr>>
Get a Ref to the value of the attribute named llvm_block_address_function.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_llvm_block_address_function(
&self,
ctx: &Context,
value: IdentifierAttr,
)
pub fn set_attr_llvm_block_address_function( &self, ctx: &Context, value: IdentifierAttr, )
Set the value of the attribute named llvm_block_address_function.
Sourcepub fn get_attr_llvm_block_address_tag<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, IntegerAttr>>
pub fn get_attr_llvm_block_address_tag<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, IntegerAttr>>
Get a Ref to the value of the attribute named llvm_block_address_tag.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_llvm_block_address_tag(&self, ctx: &Context, value: IntegerAttr)
pub fn set_attr_llvm_block_address_tag(&self, ctx: &Context, value: IntegerAttr)
Set the value of the attribute named llvm_block_address_tag.
Source§impl BlockAddressOp
impl BlockAddressOp
Sourcepub fn new(
ctx: &mut Context,
function_name: Identifier,
tag: u64,
address_space: u32,
) -> Self
pub fn new( ctx: &mut Context, function_name: Identifier, tag: u64, address_space: u32, ) -> Self
Create a new BlockAddressOp referring to a specific block (function_name, tag).
Sourcepub fn get_function_name(&self, ctx: &Context) -> Identifier
pub fn get_function_name(&self, ctx: &Context) -> Identifier
Get the function name of the block that this address refers to.
Sourcepub fn get_tag_id(&self, ctx: &Context) -> u64
pub fn get_tag_id(&self, ctx: &Context) -> u64
Get the tag of the block that this address refers to.
Sourcepub fn get_block_tag_op(
&self,
ctx: &Context,
symbol_tables: &mut SymbolTableCollection,
) -> Option<BlockTagOp>
pub fn get_block_tag_op( &self, ctx: &Context, symbol_tables: &mut SymbolTableCollection, ) -> Option<BlockTagOp>
Get the BlockTagOp that this refers to.
For a well-formed program, this should always return Some(BlockTagOp).
Trait Implementations§
Source§impl Clone for BlockAddressOp
impl Clone for BlockAddressOp
Source§fn clone(&self) -> BlockAddressOp
fn clone(&self) -> BlockAddressOp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BlockAddressOp
impl Eq for BlockAddressOp
Source§impl Hash for BlockAddressOp
impl Hash for BlockAddressOp
Source§impl NOpdsInterface<0> for BlockAddressOp
impl NOpdsInterface<0> for BlockAddressOp
§fn get_operand_i(&self, ctx: &Context, i: LessThanN<N>) -> Value
fn get_operand_i(&self, ctx: &Context, i: LessThanN<N>) -> Value
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
i’th operand.Source§impl OneResultInterface for BlockAddressOp
impl OneResultInterface for BlockAddressOp
§fn get_result(&self, ctx: &Context) -> Value
fn get_result(&self, ctx: &Context) -> Value
§fn result_type(&self, ctx: &Context) -> TypeHandle
fn result_type(&self, ctx: &Context) -> TypeHandle
Source§impl Op for BlockAddressOp
impl Op for BlockAddressOp
Source§fn get_operation(&self) -> Ptr<Operation>
fn get_operation(&self) -> Ptr<Operation>
Source§fn get_opid_static() -> OpId
fn get_opid_static() -> OpId
§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 BlockAddressOp
impl Parsable for BlockAddressOp
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 BlockAddressOp
impl PartialEq for BlockAddressOp
Source§fn eq(&self, other: &BlockAddressOp) -> bool
fn eq(&self, other: &BlockAddressOp) -> bool
self and other values to be equal, and is used by ==.Source§impl Printable for BlockAddressOp
impl Printable for BlockAddressOp
impl ResultNOfType<0, PointerType> for BlockAddressOp
impl StructuralPartialEq for BlockAddressOp
Source§impl SymbolUserOpInterface for BlockAddressOp
impl SymbolUserOpInterface for BlockAddressOp
Source§fn used_symbols(&self, ctx: &Context) -> Vec<Identifier>
fn used_symbols(&self, ctx: &Context) -> Vec<Identifier>
Source§fn verify_symbol_uses(
&self,
ctx: &Context,
symbol_tables: &mut SymbolTableCollection,
) -> Result<()>
fn verify_symbol_uses( &self, ctx: &Context, symbol_tables: &mut SymbolTableCollection, ) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for BlockAddressOp
impl !UnwindSafe for BlockAddressOp
impl Freeze for BlockAddressOp
impl Send for BlockAddressOp
impl Sync for BlockAddressOp
impl Unpin for BlockAddressOp
impl UnsafeUnpin for BlockAddressOp
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.§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
key and return true if they are equal.