// Copyright 2020 The IREE Authors
//
// Licensed 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 files defines a helper to trigger the registration of dialects to
// the system.

#ifndef IREE_TOOLS_INIT_XLA_DIALECTS_H_
#define IREE_TOOLS_INIT_XLA_DIALECTS_H_

#include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h"
#include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
#include "mlir/IR/Dialect.h"

namespace mlir {

// Add all the XLA dialects to the provided registry.
inline void registerXLADialects(DialectRegistry &registry) {
  // clang-format off
  registry.insert<mlir::chlo::HloClientDialect,
                  mlir::mhlo::MhloDialect>();
  // clang-format on
}

}  // namespace mlir

#endif  // IREE_TOOLS_INIT_XLA_DIALECTS_H_

// Copyright 2020 The IREE Authors
//
// Licensed 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 files defines a helper to trigger the registration of dialects to
// the system.

#ifndef IREE_TOOLS_INIT_XLA_DIALECTS_H_
#define IREE_TOOLS_INIT_XLA_DIALECTS_H_

#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"
#include "mlir/IR/Dialect.h"

namespace mlir {

// Add all the XLA dialects to the provided registry.
inline void registerXLADialects(DialectRegistry &registry) {
  // clang-format off
  registry.insert<mlir::chlo::HloClientDialect,
                  mlir::lmhlo::LmhloDialect,
                  mlir::mhlo::MhloDialect>();
  // clang-format on
}

}  // namespace mlir

#endif  // IREE_TOOLS_INIT_XLA_DIALECTS_H_

--- 
+++ 
@@ -12,7 +12,6 @@
 
 #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"
 #include "mlir/IR/Dialect.h"
 
 namespace mlir {
@@ -21,7 +20,6 @@
 inline void registerXLADialects(DialectRegistry &registry) {
   // clang-format off
   registry.insert<mlir::chlo::HloClientDialect,
-                  mlir::lmhlo::LmhloDialect,
                   mlir::mhlo::MhloDialect>();
   // clang-format on
 }
Move the lhlo dialect into its own directory.

Also remove it from registerAllMhloDialects and make registrations explicit.

PiperOrigin-RevId: 412411838
