From bc3293a05fdfc5b3b078aa7d1e0d5a1ef965c17a Mon Sep 17 00:00:00 2001 From: Alexander Belyaev Date: Thu, 6 Aug 2020 06:39:01 -0700 Subject: [PATCH] [MLIR] Remove Affine->STD and SCF->STD patterns from lhlo->llvm pass. PiperOrigin-RevId: 325219360 --- lib/Dialect/mhlo/transforms/lhlo_legalize_to_llvm_pass.cc | 4 ---- tests/lhlo-legalize-to-llvm.mlir | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/Dialect/mhlo/transforms/lhlo_legalize_to_llvm_pass.cc b/lib/Dialect/mhlo/transforms/lhlo_legalize_to_llvm_pass.cc index 0025273..8493a1f 100644 --- a/lib/Dialect/mhlo/transforms/lhlo_legalize_to_llvm_pass.cc +++ b/lib/Dialect/mhlo/transforms/lhlo_legalize_to_llvm_pass.cc @@ -15,8 +15,6 @@ limitations under the License. #include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h" #include "mlir-hlo/Dialect/mhlo/transforms/rewriters.h" -#include "mlir/Conversion/AffineToStandard/AffineToStandard.h" -#include "mlir/Conversion/SCFToStandard/SCFToStandard.h" #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h" #include "mlir/Dialect/LLVMIR/LLVMDialect.h" @@ -39,8 +37,6 @@ class TestLhloToLLVMPass LLVMTypeConverter converter(&getContext()); populateStdToLLVMConversionPatterns(converter, patterns); PopulateLhloToLLVMConversionPatterns(&converter, &patterns); - populateLoopToStdConversionPatterns(patterns, &getContext()); - populateAffineToStdConversionPatterns(patterns, &getContext()); ConversionTarget target(getContext()); target.addLegalDialect(); diff --git a/tests/lhlo-legalize-to-llvm.mlir b/tests/lhlo-legalize-to-llvm.mlir index 5bb1d47..45c383b 100644 --- a/tests/lhlo-legalize-to-llvm.mlir +++ b/tests/lhlo-legalize-to-llvm.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-hlo-opt %s --test-lhlo-legalize-to-llvm -split-input-file | FileCheck %s +// RUN: mlir-hlo-opt %s -lower-affine -convert-scf-to-std -test-lhlo-legalize-to-llvm -split-input-file | FileCheck %s // CHECK-LABEL: func @static_memref_cast func @static_memref_cast(%buf : memref<10x1x5xf32>) {