|
20 | 20 | using namespace mlir; |
21 | 21 | using namespace mlir::arm_sve; |
22 | 22 |
|
23 | | -template <typename OpTy> |
24 | | -class ForwardOperands : public OpConversionPattern<OpTy> { |
25 | | - using OpConversionPattern<OpTy>::OpConversionPattern; |
26 | | - |
27 | | - LogicalResult |
28 | | - matchAndRewrite(OpTy op, typename OpTy::Adaptor adaptor, |
29 | | - ConversionPatternRewriter &rewriter) const final { |
30 | | - if (adaptor.getOperands().getTypes() == op->getOperands().getTypes()) |
31 | | - return rewriter.notifyMatchFailure(op, "operand types already match"); |
32 | | - |
33 | | - rewriter.modifyOpInPlace(op, |
34 | | - [&]() { op->setOperands(adaptor.getOperands()); }); |
35 | | - return success(); |
36 | | - } |
37 | | -}; |
38 | | - |
39 | 23 | using SdotOpLowering = OneToOneConvertToLLVMPattern<SdotOp, SdotIntrOp>; |
40 | 24 | using SmmlaOpLowering = OneToOneConvertToLLVMPattern<SmmlaOp, SmmlaIntrOp>; |
41 | 25 | using UdotOpLowering = OneToOneConvertToLLVMPattern<UdotOp, UdotIntrOp>; |
@@ -204,10 +188,6 @@ void mlir::populateArmSVELegalizeForLLVMExportPatterns( |
204 | 188 | // Populate conversion patterns |
205 | 189 |
|
206 | 190 | // clang-format off |
207 | | - patterns.add<ForwardOperands<func::CallOp>, |
208 | | - ForwardOperands<func::CallIndirectOp>, |
209 | | - ForwardOperands<func::ReturnOp>>(converter, |
210 | | - &converter.getContext()); |
211 | 191 | patterns.add<SdotOpLowering, |
212 | 192 | SmmlaOpLowering, |
213 | 193 | UdotOpLowering, |
|
0 commit comments