MLIR

Multi-Level IR Compiler Framework

AttributeInterface definitions

NormalFormAttrInterface (NormalFormAttrInterface

Interface for attributes that define normal form constraints on IR.

A normal form attribute specifies additional invariants beyond those enforced by the verifiers that types, attributes, and operations may satisfy to enable certain transformations. This can be seen as a transformation pre/post-conditions.

Implementers should override one or more of verifyType, verifyAttribute, or verifyOperation to define custom verification logic. The default implementations return success.

Methods: 

checkOperation 

::mlir::DiagnosedSilenceableFailure checkOperation(::mlir::Operation*op);

Check that the given operation satisfies the constraints defined by this normal form attribute.

Produce a silenceable error at the operation’s location if constraints are not satisfied.

NOTE: This method must be implemented by the user.