From 9d4273b5a78e730b2685ce1c26d3b20aa017423e Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Tue, 8 Sep 2020 15:56:52 -0700 Subject: [PATCH] Delete mhlo static dialect registration This is obsolete now. PiperOrigin-RevId: 330605210 --- include/mlir-hlo/Dialect/mhlo/IR/register.h | 2 -- lib/Dialect/mhlo/IR/dialect_registration.cc | 23 --------------------- lib/Dialect/mhlo/IR/init.cc | 14 ------------- 3 files changed, 39 deletions(-) delete mode 100644 lib/Dialect/mhlo/IR/dialect_registration.cc diff --git a/include/mlir-hlo/Dialect/mhlo/IR/register.h b/include/mlir-hlo/Dialect/mhlo/IR/register.h index 90ff6c9..cb0af3a 100644 --- a/include/mlir-hlo/Dialect/mhlo/IR/register.h +++ b/include/mlir-hlo/Dialect/mhlo/IR/register.h @@ -20,8 +20,6 @@ namespace mlir { class DialectRegistry; namespace mhlo { -void registerAllDialects(); - // Add chlo, mhlo, lmhlo dialects to the provided registry. void registerAllMhloDialects(DialectRegistry ®istry); } diff --git a/lib/Dialect/mhlo/IR/dialect_registration.cc b/lib/Dialect/mhlo/IR/dialect_registration.cc deleted file mode 100644 index 9d1c354..0000000 --- a/lib/Dialect/mhlo/IR/dialect_registration.cc +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h" -#include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h" -#include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h" - -// Static initialization for *HLO dialects registration. -static mlir::DialectRegistration mhlo_ops; -static mlir::DialectRegistration chlo_ops; -static mlir::DialectRegistration lmhlo_ops; diff --git a/lib/Dialect/mhlo/IR/init.cc b/lib/Dialect/mhlo/IR/init.cc index cf8bd25..503b100 100644 --- a/lib/Dialect/mhlo/IR/init.cc +++ b/lib/Dialect/mhlo/IR/init.cc @@ -18,20 +18,6 @@ limitations under the License. #include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h" #include "mlir-hlo/Dialect/mhlo/IR/register.h" -// Static initialization for *HLO dialects registration. - -void mlir::mhlo::registerAllDialects() { - static bool init_once = []() { - registerDialect(); - registerDialect(); - registerDialect(); - return true; - }(); - (void)init_once; - - // Dependent dialects -} - void mlir::mhlo::registerAllMhloDialects(mlir::DialectRegistry ®istry) { // clang-format off registry.insert