mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
This allows for bucketing the different possible storage types, with each bucket having its own allocator/mutex/instance map. This greatly reduces the amount of lock contention when multi-threading is enabled. On some non-trivial .mlir modules (>300K operations), this led to a compile time decrease of a single conversion pass by around half a second(>25%). Differential Revision: https://reviews.llvm.org/D82596
24 lines
1010 B
C++
24 lines
1010 B
C++
//===- 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"
|
|
#include "SDBMExprDetail.h"
|
|
|
|
using namespace mlir;
|
|
|
|
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>());
|
|
}
|
|
|
|
SDBMDialect::~SDBMDialect() = default;
|