MLIR  18.0.0git
Public Member Functions | Friends | List of all members
mlir::detail::PDLByteCodeMutableState Class Reference

This class contains the mutable state of a bytecode instance. More...

#include "Rewrite/ByteCode.h"

Public Member Functions

void updatePatternBenefit (unsigned patternIndex, PatternBenefit benefit)
 Set the new benefit for a bytecode pattern. More...
 
void cleanupAfterMatchAndRewrite ()
 Cleanup any allocated state after a match/rewrite has been completed. More...
 

Friends

class PDLByteCode
 Allow access to data fields. More...
 

Detailed Description

This class contains the mutable state of a bytecode instance.

This allows for a bytecode instance to be cached and reused across various different threads/drivers.

Definition at line 71 of file ByteCode.h.

Member Function Documentation

◆ cleanupAfterMatchAndRewrite()

void PDLByteCodeMutableState::cleanupAfterMatchAndRewrite ( )

Cleanup any allocated state after a match/rewrite has been completed.

Cleanup any allocated state after a full match/rewrite has been completed.

This method should be called irregardless of whether the match+rewrite was a success or not.

Definition at line 72 of file ByteCode.cpp.

◆ updatePatternBenefit()

void PDLByteCodeMutableState::updatePatternBenefit ( unsigned  patternIndex,
PatternBenefit  benefit 
)

Set the new benefit for a bytecode pattern.

The patternIndex corresponds to the position of the pattern within the range returned by PDLByteCode::getPatterns.

Definition at line 64 of file ByteCode.cpp.

Friends And Related Function Documentation

◆ PDLByteCode

friend class PDLByteCode
friend

Allow access to data fields.

Definition at line 85 of file ByteCode.h.


The documentation for this class was generated from the following files: