MLIR  20.0.0git
Public Member Functions | List of all members
mlir::irdl::RegionConstraint Struct Reference

A constraint checking that a region satisfies irdl.region requirements. More...

#include "mlir/Dialect/IRDL/IRDLVerifiers.h"

Public Member Functions

 RegionConstraint (std::optional< SmallVector< unsigned >> argumentConstraints, std::optional< size_t > blockCount)
 The constructor accepts constrained entities from the irdl.region operation, such as slots of constraints for the region's arguments and the block count. More...
 
LogicalResult verify (mlir::Region &region, ConstraintVerifier &constraintContext)
 Check that the region satisfies the constraint. More...
 

Detailed Description

A constraint checking that a region satisfies irdl.region requirements.

Definition at line 228 of file IRDLVerifiers.h.

Constructor & Destructor Documentation

◆ RegionConstraint()

mlir::irdl::RegionConstraint::RegionConstraint ( std::optional< SmallVector< unsigned >>  argumentConstraints,
std::optional< size_t >  blockCount 
)
inline

The constructor accepts constrained entities from the irdl.region operation, such as slots of constraints for the region's arguments and the block count.

Definition at line 235 of file IRDLVerifiers.h.

Member Function Documentation

◆ verify()

LogicalResult RegionConstraint::verify ( mlir::Region region,
ConstraintVerifier constraintContext 
)

Check that the region satisfies the constraint.

constraintContext is needed to verify the region's arguments constraints.

Definition at line 217 of file IRDLVerifiers.cpp.

References diag(), mlir::emitError(), mlir::get(), mlir::Region::getArguments(), mlir::Region::getBlocks(), mlir::Region::getLoc(), mlir::Region::getParentOp(), mlir::Region::getRegionNumber(), and mlir::irdl::ConstraintVerifier::verify().


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