From 3393cc4cebf9969db94dc424b7a2b6195589c33b Mon Sep 17 00:00:00 2001 From: Nicolas Vasilache Date: Wed, 20 May 2020 17:58:10 -0400 Subject: [PATCH] [mlir] NFC - Appease GCC 5 again.. --- mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp index 4743fe67f764..f703a8c621e6 100644 --- a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp +++ b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp @@ -437,15 +437,17 @@ clip(TransferOpTy transfer, MemRefBoundsCapture &bounds, ArrayRef ivs) { return clippedScalarAccessExprs; } +namespace mlir { + template -mlir::VectorTransferRewriter::VectorTransferRewriter( +VectorTransferRewriter::VectorTransferRewriter( VectorTransferToSCFOptions options, MLIRContext *context) : RewritePattern(TransferOpTy::getOperationName(), 1, context), options(options) {} /// Used for staging the transfer in a local buffer. template -MemRefType mlir::VectorTransferRewriter::tmpMemRefType( +MemRefType VectorTransferRewriter::tmpMemRefType( TransferOpTy transfer) const { auto vectorType = transfer.getVectorType(); return MemRefType::get(vectorType.getShape(), vectorType.getElementType(), {}, @@ -496,7 +498,7 @@ MemRefType mlir::VectorTransferRewriter::tmpMemRefType( /// Performs the rewrite. template <> -LogicalResult mlir::VectorTransferRewriter::matchAndRewrite( +LogicalResult VectorTransferRewriter::matchAndRewrite( Operation *op, PatternRewriter &rewriter) const { using namespace mlir::edsc::op; @@ -569,7 +571,7 @@ LogicalResult mlir::VectorTransferRewriter::matchAndRewrite( /// TODO(ntv): implement alternatives to clipping. /// TODO(ntv): support non-data-parallel operations. template <> -LogicalResult mlir::VectorTransferRewriter::matchAndRewrite( +LogicalResult VectorTransferRewriter::matchAndRewrite( Operation *op, PatternRewriter &rewriter) const { using namespace edsc::op; @@ -622,10 +624,13 @@ LogicalResult mlir::VectorTransferRewriter::matchAndRewrite( return success(); } -void mlir::populateVectorToSCFConversionPatterns( +void populateVectorToSCFConversionPatterns( OwningRewritePatternList &patterns, MLIRContext *context, const VectorTransferToSCFOptions &options) { patterns.insert, VectorTransferRewriter>(options, context); } + +} // namespace mlir +