forked from OSchip/llvm-project
[mlir:ArmSVE][NFC] Remove dead code and unnecessary dependencies
Differential Revision: https://reviews.llvm.org/D117981
This commit is contained in:
parent
a70aa7bb0d
commit
88c1df64bd
|
@ -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
|
||||
|
|
|
@ -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,12 +19,27 @@
|
|||
#include "llvm/ADT/TypeSwitch.h"
|
||||
|
||||
using namespace mlir;
|
||||
using namespace arm_sve;
|
||||
using namespace mlir::arm_sve;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// 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
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Dialect/ArmSVE/ArmSVEDialect.cpp.inc"
|
||||
|
||||
static Type getI1SameShape(Type type);
|
||||
|
||||
#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;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,5 @@ add_mlir_dialect_library(MLIRArmSVE
|
|||
LINK_LIBS PUBLIC
|
||||
MLIRIR
|
||||
MLIRLLVMIR
|
||||
MLIRStandard
|
||||
MLIRSideEffectInterfaces
|
||||
)
|
||||
|
|
|
@ -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>;
|
||||
|
|
Loading…
Reference in New Issue