================ @@ -1468,6 +1468,18 @@ LogicalResult CancellationPointOp::verify() { return success(); } +//===----------------------------------------------------------------------===// +// RegionOp +//===----------------------------------------------------------------------===// + +LogicalResult StructuredRegionOp::verify() { + Operation *parentOp = (*this)->getParentOp(); + assert(parentOp && "'omp.region' op must have a parent"); + if (!isa<OpenMPDialect>(parentOp->getDialect())) + return emitOpError() << "must be used under an OpenMP Dialect operation"; + return success(); +} ---------------- kiranchandramohan wrote:
This is OK for now, But in future when privatisation is modelled in the dialect for things like the worksharing loop where the bounds can also be privatised, this can be a wrapper around the region. ``` omp.structured_region private(%upper=%x) { %upper: omp.wsloop for (%i) : i32 = (%c1) to (%upper) inclusive step (%c1) { } } ``` https://github.com/llvm/llvm-project/pull/68825 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits