[Mlir-commits] [mlir] 88c1df6 - [mlir:ArmSVE][NFC] Remove dead code and unnecessary dependencies
River Riddle
llvmlistbot at llvm.org
Mon Jan 24 19:30:21 PST 2022
Author: River Riddle
Date: 2022-01-24T19:25:53-08:00
New Revision: 88c1df64bdd379b4fb5a7946124c7f52a9c795da
URL: https://github.com/llvm/llvm-project/commit/88c1df64bdd379b4fb5a7946124c7f52a9c795da
DIFF: https://github.com/llvm/llvm-project/commit/88c1df64bdd379b4fb5a7946124c7f52a9c795da.diff
LOG: [mlir:ArmSVE][NFC] Remove dead code and unnecessary dependencies
Differential Revision: https://reviews.llvm.org/D117981
Added:
Modified:
mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td
mlir/lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp
mlir/lib/Dialect/ArmSVE/IR/CMakeLists.txt
mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td b/mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td
index 5ffcf740496d..19dcfabe972b 100644
--- a/mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td
+++ b/mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td
@@ -15,7 +15,6 @@
include "mlir/Interfaces/SideEffectInterfaces.td"
include "mlir/Dialect/LLVMIR/LLVMOpBase.td"
-include "mlir/Dialect/Arithmetic/IR/ArithmeticBase.td"
//===----------------------------------------------------------------------===//
// ArmSVE dialect definition
diff --git a/mlir/lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp b/mlir/lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp
index b3c79040c48d..1ea2fad56272 100644
--- a/mlir/lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp
+++ b/mlir/lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp
@@ -12,7 +12,6 @@
#include "mlir/Dialect/ArmSVE/ArmSVEDialect.h"
#include "mlir/Dialect/LLVMIR/LLVMTypes.h"
-#include "mlir/Dialect/Vector/VectorOps.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/OpImplementation.h"
@@ -20,11 +19,26 @@
#include "llvm/ADT/TypeSwitch.h"
using namespace mlir;
-using namespace arm_sve;
+using namespace mlir::arm_sve;
-#include "mlir/Dialect/ArmSVE/ArmSVEDialect.cpp.inc"
+//===----------------------------------------------------------------------===//
+// ScalableVector versions of general helpers for comparison ops
+//===----------------------------------------------------------------------===//
+
+/// Return the scalable vector of the same shape and containing i1.
+static Type getI1SameShape(Type type) {
+ auto i1Type = IntegerType::get(type.getContext(), 1);
+ if (auto sVectorType = type.dyn_cast<VectorType>())
+ return VectorType::get(sVectorType.getShape(), i1Type,
+ sVectorType.getNumScalableDims());
+ return nullptr;
+}
+
+//===----------------------------------------------------------------------===//
+// Tablegen Definitions
+//===----------------------------------------------------------------------===//
-static Type getI1SameShape(Type type);
+#include "mlir/Dialect/ArmSVE/ArmSVEDialect.cpp.inc"
#define GET_OP_CLASSES
#include "mlir/Dialect/ArmSVE/ArmSVE.cpp.inc"
@@ -38,16 +52,3 @@ void ArmSVEDialect::initialize() {
#include "mlir/Dialect/ArmSVE/ArmSVE.cpp.inc"
>();
}
-
-//===----------------------------------------------------------------------===//
-// ScalableVector versions of general helpers for comparison ops
-//===----------------------------------------------------------------------===//
-
-// Return the scalable vector of the same shape and containing i1.
-static Type getI1SameShape(Type type) {
- auto i1Type = IntegerType::get(type.getContext(), 1);
- if (auto sVectorType = type.dyn_cast<VectorType>())
- return VectorType::get(sVectorType.getShape(), i1Type,
- sVectorType.getNumScalableDims());
- return nullptr;
-}
diff --git a/mlir/lib/Dialect/ArmSVE/IR/CMakeLists.txt b/mlir/lib/Dialect/ArmSVE/IR/CMakeLists.txt
index 4a2393e7ac3d..9177b5889b94 100644
--- a/mlir/lib/Dialect/ArmSVE/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/ArmSVE/IR/CMakeLists.txt
@@ -10,6 +10,5 @@ add_mlir_dialect_library(MLIRArmSVE
LINK_LIBS PUBLIC
MLIRIR
MLIRLLVMIR
- MLIRStandard
MLIRSideEffectInterfaces
)
diff --git a/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp b/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
index fdda398fa01a..95bc3e6b2959 100644
--- a/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
+++ b/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
@@ -11,7 +11,6 @@
#include "mlir/Dialect/ArmSVE/ArmSVEDialect.h"
#include "mlir/Dialect/ArmSVE/Transforms.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/PatternMatch.h"
@@ -34,19 +33,6 @@ class ForwardOperands : public OpConversionPattern<OpTy> {
}
};
-class ReturnOpTypeConversion : public OpConversionPattern<ReturnOp> {
-public:
- using OpConversionPattern<ReturnOp>::OpConversionPattern;
-
- LogicalResult
- matchAndRewrite(ReturnOp op, OpAdaptor adaptor,
- ConversionPatternRewriter &rewriter) const final {
- rewriter.updateRootInPlace(
- op, [&]() { op->setOperands(adaptor.getOperands()); });
- return success();
- }
-};
-
using SdotOpLowering = OneToOneConvertToLLVMPattern<SdotOp, SdotIntrOp>;
using SmmlaOpLowering = OneToOneConvertToLLVMPattern<SmmlaOp, SmmlaIntrOp>;
using UdotOpLowering = OneToOneConvertToLLVMPattern<UdotOp, UdotIntrOp>;
More information about the Mlir-commits
mailing list