[Mlir-commits] [mlir] b885b1b - [mlir] Fix gcc build break due to previous commit

Thomas Raoux llvmlistbot at llvm.org
Fri Jun 19 19:01:03 PDT 2020


Author: Thomas Raoux
Date: 2020-06-19T19:00:14-07:00
New Revision: b885b1b92d3d9bfcc8229476f4ad4660305d6160

URL: https://github.com/llvm/llvm-project/commit/b885b1b92d3d9bfcc8229476f4ad4660305d6160
DIFF: https://github.com/llvm/llvm-project/commit/b885b1b92d3d9bfcc8229476f4ad4660305d6160.diff

LOG: [mlir] Fix gcc build break due to previous commit

Added: 
    

Modified: 
    mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp b/mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
index 0d949f74c191..19643d271f8d 100644
--- a/mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
+++ b/mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
@@ -51,6 +51,40 @@ class StoreOpOfSubViewFolder final : public OpRewritePattern<OpTy> {
                  ArrayRef<Value> sourceIndices,
                  PatternRewriter &rewriter) const;
 };
+
+template <>
+void LoadOpOfSubViewFolder<LoadOp>::replaceOp(LoadOp loadOp,
+                                              SubViewOp subViewOp,
+                                              ArrayRef<Value> sourceIndices,
+                                              PatternRewriter &rewriter) const {
+  rewriter.replaceOpWithNewOp<LoadOp>(loadOp, subViewOp.source(),
+                                      sourceIndices);
+}
+
+template <>
+void LoadOpOfSubViewFolder<vector::TransferReadOp>::replaceOp(
+    vector::TransferReadOp loadOp, SubViewOp subViewOp,
+    ArrayRef<Value> sourceIndices, PatternRewriter &rewriter) const {
+  rewriter.replaceOpWithNewOp<vector::TransferReadOp>(
+      loadOp, loadOp.getVectorType(), subViewOp.source(), sourceIndices);
+}
+
+template <>
+void StoreOpOfSubViewFolder<StoreOp>::replaceOp(
+    StoreOp storeOp, SubViewOp subViewOp, ArrayRef<Value> sourceIndices,
+    PatternRewriter &rewriter) const {
+  rewriter.replaceOpWithNewOp<StoreOp>(storeOp, storeOp.value(),
+                                       subViewOp.source(), sourceIndices);
+}
+
+template <>
+void StoreOpOfSubViewFolder<vector::TransferWriteOp>::replaceOp(
+    vector::TransferWriteOp tranferWriteOp, SubViewOp subViewOp,
+    ArrayRef<Value> sourceIndices, PatternRewriter &rewriter) const {
+  rewriter.replaceOpWithNewOp<vector::TransferWriteOp>(
+      tranferWriteOp, tranferWriteOp.vector(), subViewOp.source(),
+      sourceIndices);
+}
 } // namespace
 
 //===----------------------------------------------------------------------===//
@@ -118,23 +152,6 @@ LoadOpOfSubViewFolder<OpTy>::matchAndRewrite(OpTy loadOp,
   return success();
 }
 
-template <>
-void LoadOpOfSubViewFolder<LoadOp>::replaceOp(LoadOp loadOp,
-                                              SubViewOp subViewOp,
-                                              ArrayRef<Value> sourceIndices,
-                                              PatternRewriter &rewriter) const {
-  rewriter.replaceOpWithNewOp<LoadOp>(loadOp, subViewOp.source(),
-                                      sourceIndices);
-}
-
-template <>
-void LoadOpOfSubViewFolder<vector::TransferReadOp>::replaceOp(
-    vector::TransferReadOp loadOp, SubViewOp subViewOp,
-    ArrayRef<Value> sourceIndices, PatternRewriter &rewriter) const {
-  rewriter.replaceOpWithNewOp<vector::TransferReadOp>(
-      loadOp, loadOp.getVectorType(), subViewOp.source(), sourceIndices);
-}
-
 //===----------------------------------------------------------------------===//
 // Folding SubViewOp and StoreOp/TransferWriteOp.
 //===----------------------------------------------------------------------===//
@@ -156,23 +173,6 @@ StoreOpOfSubViewFolder<OpTy>::matchAndRewrite(OpTy storeOp,
   return success();
 }
 
-template <>
-void StoreOpOfSubViewFolder<StoreOp>::replaceOp(
-    StoreOp storeOp, SubViewOp subViewOp, ArrayRef<Value> sourceIndices,
-    PatternRewriter &rewriter) const {
-  rewriter.replaceOpWithNewOp<StoreOp>(storeOp, storeOp.value(),
-                                       subViewOp.source(), sourceIndices);
-}
-
-template <>
-void StoreOpOfSubViewFolder<vector::TransferWriteOp>::replaceOp(
-    vector::TransferWriteOp tranferWriteOp, SubViewOp subViewOp,
-    ArrayRef<Value> sourceIndices, PatternRewriter &rewriter) const {
-  rewriter.replaceOpWithNewOp<vector::TransferWriteOp>(
-      tranferWriteOp, tranferWriteOp.vector(), subViewOp.source(),
-      sourceIndices);
-}
-
 //===----------------------------------------------------------------------===//
 // Hook for adding patterns.
 //===----------------------------------------------------------------------===//


        


More information about the Mlir-commits mailing list