Define SDBM key methods in its own cpp file.
Summary:
* Follows the convention of the tablegen-generated dialects.
* Ensures that vague linkage rules place the definitions in the dialect's object files.
* Allows code that uses RTTI to include MLIR headers (compiled without RTTI) without
type_info link errors.
Reviewers: rriddle
Reviewed By: rriddle
Subscribers: mgorny, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78039
2020-04-20 10:12:39 +08:00
|
|
|
//===- SDBMDialect.cpp - MLIR SDBM Dialect --------------------------------===//
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "mlir/Dialect/SDBM/SDBMDialect.h"
|
2020-08-08 04:29:11 +08:00
|
|
|
#include "SDBMExprDetail.h"
|
Define SDBM key methods in its own cpp file.
Summary:
* Follows the convention of the tablegen-generated dialects.
* Ensures that vague linkage rules place the definitions in the dialect's object files.
* Allows code that uses RTTI to include MLIR headers (compiled without RTTI) without
type_info link errors.
Reviewers: rriddle
Reviewed By: rriddle
Subscribers: mgorny, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78039
2020-04-20 10:12:39 +08:00
|
|
|
|
|
|
|
using namespace mlir;
|
|
|
|
|
2020-08-08 04:29:11 +08:00
|
|
|
SDBMDialect::SDBMDialect(MLIRContext *context)
|
|
|
|
: Dialect(getDialectNamespace(), context, TypeID::get<SDBMDialect>()) {
|
|
|
|
uniquer.registerStorageType(TypeID::get<detail::SDBMBinaryExprStorage>());
|
|
|
|
uniquer.registerStorageType(TypeID::get<detail::SDBMConstantExprStorage>());
|
|
|
|
uniquer.registerStorageType(TypeID::get<detail::SDBMDiffExprStorage>());
|
|
|
|
uniquer.registerStorageType(TypeID::get<detail::SDBMNegExprStorage>());
|
|
|
|
uniquer.registerStorageType(TypeID::get<detail::SDBMTermExprStorage>());
|
|
|
|
}
|
|
|
|
|
Define SDBM key methods in its own cpp file.
Summary:
* Follows the convention of the tablegen-generated dialects.
* Ensures that vague linkage rules place the definitions in the dialect's object files.
* Allows code that uses RTTI to include MLIR headers (compiled without RTTI) without
type_info link errors.
Reviewers: rriddle
Reviewed By: rriddle
Subscribers: mgorny, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78039
2020-04-20 10:12:39 +08:00
|
|
|
SDBMDialect::~SDBMDialect() = default;
|