From f39466cc2d6721ef43fc02bec3b45dbf9967d6ef Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Thu, 20 Aug 2020 18:50:13 -0700 Subject: [PATCH] Add explicit dialect registration for mlir-hlo-opt This is fixing the build after upstream changes. PiperOrigin-RevId: 327738263 --- tools/mlir-hlo-opt/mlir-hlo-opt.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/mlir-hlo-opt/mlir-hlo-opt.cpp b/tools/mlir-hlo-opt/mlir-hlo-opt.cpp index f82c5cc..d0c0e3c 100644 --- a/tools/mlir-hlo-opt/mlir-hlo-opt.cpp +++ b/tools/mlir-hlo-opt/mlir-hlo-opt.cpp @@ -13,18 +13,25 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "mlir-hlo/Dialect/mhlo/IR/register.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-hlo/Dialect/mhlo/transforms/register_passes.h" #include "mlir/InitAllDialects.h" #include "mlir/InitAllPasses.h" #include "mlir/Support/MlirOptMain.h" int main(int argc, char **argv) { - mlir::DialectRegistry registry; - mlir::registerAllDialects(registry); mlir::registerAllPasses(); mlir::mhlo::registerAllMhloPasses(); mlir::lmhlo::registerAllLmhloPasses(); + + mlir::DialectRegistry registry; + mlir::registerAllDialects(registry); + registry.insert(); + registry.insert(); + registry.insert(); + return failed( mlir::MlirOptMain(argc, argv, "MLIR HLO pass driver\n", registry)); }