14 #include "../EmissionPrinter.h"
17 using namespace circt;
31 using OpEmissionPattern::OpEmissionPattern;
34 if (value.getDefiningOp<ConstantOp>())
35 return Precedence::LIT;
40 p.
emitAttr(value.getDefiningOp<ConstantOp>().getValueAttr());
50 MLIRContext *context) {
51 patterns.add<ConstantEmitter>(context);
This class collects a set of emission patterns with base type 'PatternTy'.
This is intended to be the driving class for all pattern-based IR emission.
void emitAttr(Attribute attr)
Emit the given attribute to the ostream associated with this printer according to the emission patter...
This class allows a pattern's match function for inlining to pass its result's precedence to the patt...
void populateHWEmitters(OpEmissionPatternSet &patterns, MLIRContext *context)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
This is a convenience class providing default implementations for operation emission patterns.