MLIR 23.0.0git
OpenMPDialect.h
Go to the documentation of this file.
1//===- OpenMPDialect.h - MLIR Dialect for OpenMP ----------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file declares the OpenMP dialect in MLIR.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_DIALECT_OPENMP_OPENMPDIALECT_H_
14#define MLIR_DIALECT_OPENMP_OPENMPDIALECT_H_
15
21#include "mlir/IR/Dialect.h"
24#include "mlir/IR/SymbolTable.h"
27#include "llvm/Frontend/OpenMP/OMPDeviceConstants.h"
28
29#define GET_TYPEDEF_CLASSES
30#include "mlir/Dialect/OpenMP/OpenMPOpsTypes.h.inc"
31
32#include "mlir/Dialect/OpenMP/OpenMPOpsDialect.h.inc"
33
35
36#include "mlir/Dialect/OpenMP/OpenMPTypeInterfaces.h.inc"
37
38#define GET_OP_CLASSES
39#include "mlir/Dialect/OpenMP/OpenMPOps.h.inc"
40
41/// Operations implementing LoopWrapperInterface.
42#define OMP_LOOP_WRAPPER_OPS \
43 mlir::omp::WorkshareLoopWrapperOp, mlir::omp::LoopOp, mlir::omp::WsloopOp, \
44 mlir::omp::SimdOp, mlir::omp::DistributeOp, mlir::omp::TaskloopOp
45
46/// Operations implementing OutlineableOpenMPOpInterface.
47#define OMP_OUTLINEABLE_OPS \
48 mlir::omp::ParallelOp, mlir::omp::TeamsOp, mlir::omp::TaskOp, \
49 mlir::omp::TargetOp
50
51namespace mlir::omp {
52/// Find the omp.new_cli, generator, and consumer of a canonical loop info.
53std::tuple<NewCliOp, OpOperand *, OpOperand *> decodeCli(mlir::Value cli);
54} // namespace mlir::omp
55
56#endif // MLIR_DIALECT_OPENMP_OPENMPDIALECT_H_
Shared utilities for setting OpenMP offload module interface attributes.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition Value.h:96
std::tuple< NewCliOp, OpOperand *, OpOperand * > decodeCli(mlir::Value cli)
Find the omp.new_cli, generator, and consumer of a canonical loop info.