In the previous state, we were relying on forcing the linker to include all libraries in the final binary and the global initializer to self-register every piece of the system. This change help moving away from this model, and allow users to compose pieces more freely. The current change is only "fixing" the dialect registration and avoiding relying on "whole link" for the passes. The translation is still relying on the global registry, and some refactoring is needed to make this all more convenient. Differential Revision: https://reviews.llvm.org/D74461
33 lines
999 B
C++
33 lines
999 B
C++
//===- OpenMPDialect.cpp - MLIR Dialect for OpenMP implementation ---------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file implements the OpenMP dialect and its operations.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
|
|
#include "mlir/IR/OpImplementation.h"
|
|
|
|
using namespace mlir;
|
|
using namespace mlir::omp;
|
|
|
|
OpenMPDialect::OpenMPDialect(MLIRContext *context)
|
|
: Dialect(getDialectNamespace(), context) {
|
|
addOperations<
|
|
#define GET_OP_LIST
|
|
#include "mlir/Dialect/OpenMP/OpenMPOps.cpp.inc"
|
|
>();
|
|
}
|
|
|
|
namespace mlir {
|
|
namespace omp {
|
|
#define GET_OP_CLASSES
|
|
#include "mlir/Dialect/OpenMP/OpenMPOps.cpp.inc"
|
|
} // namespace omp
|
|
} // namespace mlir
|