[PATCH] D75589: [MLIR][Affine][NFC] Expose expandAffineMap

Frank Laub via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 14:40:04 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGcdc5cba7211a: [MLIR][Affine][NFC] Expose expandAffineMap (authored by flaub).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75589/new/

https://reviews.llvm.org/D75589

Files:
  mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
  mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp


Index: mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
===================================================================
--- mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
+++ mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
@@ -216,10 +216,10 @@
 
 /// Create a sequence of operations that implement the `affineMap` applied to
 /// the given `operands` (as it it were an AffineApplyOp).
-Optional<SmallVector<Value, 8>> static expandAffineMap(OpBuilder &builder,
-                                                       Location loc,
-                                                       AffineMap affineMap,
-                                                       ValueRange operands) {
+Optional<SmallVector<Value, 8>> mlir::expandAffineMap(OpBuilder &builder,
+                                                      Location loc,
+                                                      AffineMap affineMap,
+                                                      ValueRange operands) {
   auto numDims = affineMap.getNumDims();
   auto expanded = functional::map(
       [numDims, &builder, loc, operands](AffineExpr expr) {
Index: mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
===================================================================
--- mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
+++ mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
@@ -14,6 +14,7 @@
 namespace mlir {
 class AffineExpr;
 class AffineForOp;
+class AffineMap;
 class Location;
 struct LogicalResult;
 class MLIRContext;
@@ -30,6 +31,13 @@
 Value expandAffineExpr(OpBuilder &builder, Location loc, AffineExpr expr,
                        ValueRange dimValues, ValueRange symbolValues);
 
+/// Create a sequence of operations that implement the `affineMap` applied to
+/// the given `operands` (as it it were an AffineApplyOp).
+Optional<SmallVector<Value, 8>> expandAffineMap(OpBuilder &builder,
+                                                Location loc,
+                                                AffineMap affineMap,
+                                                ValueRange operands);
+
 /// Collect a set of patterns to convert from the Affine dialect to the Standard
 /// dialect, in particular convert structured affine control flow into CFG
 /// branch-based control flow.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75589.248321.patch
Type: text/x-patch
Size: 2362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200304/a941cde8/attachment.bin>


More information about the llvm-commits mailing list