[llvm-branch-commits] [mlir] b1e1bba - [mlir] Add ComplexDialect to SCF->GPU pass.

Alexander Belyaev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 20 12:23:06 PST 2021


Author: Alexander Belyaev
Date: 2021-01-20T21:18:09+01:00
New Revision: b1e1bbae0e30c89251940efb0780eee6a1b79ecd

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

LOG: [mlir] Add ComplexDialect to SCF->GPU pass.

Added: 
    

Modified: 
    mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
    mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/SCFToGPU/CMakeLists.txt b/mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
index 10fed819ca35..f3de289c28cc 100644
--- a/mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
+++ b/mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
@@ -11,6 +11,7 @@ add_mlir_conversion_library(MLIRSCFToGPU
   LINK_LIBS PUBLIC
   MLIRAffine
   MLIRAffineToStandard
+  MLIRComplex
   MLIRGPU
   MLIRIR
   MLIRLinalg

diff  --git a/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp b/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
index 2941b400babe..66fbacf69d5b 100644
--- a/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
+++ b/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
@@ -10,6 +10,7 @@
 #include "../PassDetail.h"
 #include "mlir/Conversion/SCFToGPU/SCFToGPU.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Complex/IR/Complex.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/StandardOps/IR/Ops.h"
@@ -49,10 +50,9 @@ struct ParallelLoopToGpuPass
     OwningRewritePatternList patterns;
     populateParallelLoopToGPUPatterns(patterns, &getContext());
     ConversionTarget target(getContext());
-    target.addLegalDialect<StandardOpsDialect>();
-    target.addLegalDialect<AffineDialect>();
-    target.addLegalDialect<gpu::GPUDialect>();
-    target.addLegalDialect<scf::SCFDialect>();
+    target.addLegalDialect<AffineDialect, complex::ComplexDialect,
+                           gpu::GPUDialect, scf::SCFDialect,
+                           StandardOpsDialect>();
     configureParallelLoopToGPULegality(target);
     if (failed(applyPartialConversion(getOperation(), target,
                                       std::move(patterns))))


        


More information about the llvm-branch-commits mailing list