pub struct RecordMatchOperation<'c> { /* private fields */ }Expand description
A record_match operation. Record the metadata for a successful pattern match.
pdl_interp.record_match operations record a successful pattern match with
the interpreter and branch to the next part of the matcher. The metadata
recorded by these operations correspond to a specific pdl.pattern, as well
as what values were used during that match that should be propagated to the
rewriter.
Example:
pdl_interp.record_match @rewriters::myRewriter(%root : !pdl.operation) : benefit(1), loc([%root, %op1]), root("foo.op") -> ^nextDestImplementations§
Source§impl<'c> RecordMatchOperation<'c>
impl<'c> RecordMatchOperation<'c>
Sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
Sourcepub fn builder(
context: &'c Context,
location: Location<'c>,
) -> RecordMatchOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c>, ) -> RecordMatchOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn inputs(&self) -> Result<impl Iterator<Item = Value<'c, '_>>, Error>
pub fn matched_ops(&self) -> Result<impl Iterator<Item = Value<'c, '_>>, Error>
pub fn dest(&self) -> Result<BlockRef<'c, '_>, Error>
pub fn rewriter(&self) -> Result<Attribute<'c>, Error>
pub fn set_rewriter(&mut self, value: Attribute<'c>)
pub fn root_kind(&self) -> Result<StringAttribute<'c>, Error>
pub fn set_root_kind(&mut self, value: StringAttribute<'c>)
pub fn remove_root_kind(&mut self) -> Result<(), Error>
pub fn generated_ops(&self) -> Result<ArrayAttribute<'c>, Error>
pub fn set_generated_ops(&mut self, value: ArrayAttribute<'c>)
pub fn remove_generated_ops(&mut self) -> Result<(), Error>
pub fn benefit(&self) -> Result<IntegerAttribute<'c>, Error>
pub fn set_benefit(&mut self, value: IntegerAttribute<'c>)
Trait Implementations§
Source§impl<'c> Clone for RecordMatchOperation<'c>
impl<'c> Clone for RecordMatchOperation<'c>
Source§fn clone(&self) -> RecordMatchOperation<'c>
fn clone(&self) -> RecordMatchOperation<'c>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'c> Debug for RecordMatchOperation<'c>
impl<'c> Debug for RecordMatchOperation<'c>
Source§impl<'b> From<RecordMatchOperation<'b>> for PdlInterpDialectOperation<'b>
impl<'b> From<RecordMatchOperation<'b>> for PdlInterpDialectOperation<'b>
Source§fn from(op: RecordMatchOperation<'b>) -> Self
fn from(op: RecordMatchOperation<'b>) -> Self
Converts to this type from the input type.
Source§impl<'c> From<RecordMatchOperation<'c>> for Operation<'c>
impl<'c> From<RecordMatchOperation<'c>> for Operation<'c>
Source§fn from(operation: RecordMatchOperation<'c>) -> Self
fn from(operation: RecordMatchOperation<'c>) -> Self
Converts to this type from the input type.
Source§impl<'c> PartialEq for RecordMatchOperation<'c>
impl<'c> PartialEq for RecordMatchOperation<'c>
Source§impl<'c> TryFrom<Operation<'c>> for RecordMatchOperation<'c>
impl<'c> TryFrom<Operation<'c>> for RecordMatchOperation<'c>
impl<'c> Eq for RecordMatchOperation<'c>
impl<'c> StructuralPartialEq for RecordMatchOperation<'c>
Auto Trait Implementations§
impl<'c> Freeze for RecordMatchOperation<'c>
impl<'c> RefUnwindSafe for RecordMatchOperation<'c>
impl<'c> !Send for RecordMatchOperation<'c>
impl<'c> !Sync for RecordMatchOperation<'c>
impl<'c> Unpin for RecordMatchOperation<'c>
impl<'c> UnwindSafe for RecordMatchOperation<'c>
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