diff options
| author | Nicolas Vasilache <ntv@google.com> | 2018-10-09 16:39:24 -0700 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 13:26:24 -0700 |
| commit | 1d3e7e2616b792831f0fc2db632eb1cad5241bfd (patch) | |
| tree | 59c93c29c00ede22bd8f70f541bc04019b4fd1c9 /mlir/lib/Transforms/SimplifyAffineExpr.cpp | |
| parent | 82e55750d2dee6b927061574a31ed3eab2d92b16 (diff) | |
| download | bcm5719-llvm-1d3e7e2616b792831f0fc2db632eb1cad5241bfd.tar.gz bcm5719-llvm-1d3e7e2616b792831f0fc2db632eb1cad5241bfd.zip | |
[MLIR] AffineMap value type
This CL applies the same pattern as AffineExpr to AffineMap: a simple struct
that acts as the storage is allocated in the bump pointer. The AffineMap is
immutable and accessed everywhere by value.
PiperOrigin-RevId: 216445930
Diffstat (limited to 'mlir/lib/Transforms/SimplifyAffineExpr.cpp')
| -rw-r--r-- | mlir/lib/Transforms/SimplifyAffineExpr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/Transforms/SimplifyAffineExpr.cpp b/mlir/lib/Transforms/SimplifyAffineExpr.cpp index 30d3908ac33..a3b8ebf1ba8 100644 --- a/mlir/lib/Transforms/SimplifyAffineExpr.cpp +++ b/mlir/lib/Transforms/SimplifyAffineExpr.cpp @@ -59,10 +59,10 @@ PassResult SimplifyAffineExpr::runOnMLFunction(MLFunction *f) { void visitOperationStmt(OperationStmt *opStmt) { for (auto attr : opStmt->getAttrs()) { if (auto *mapAttr = dyn_cast<AffineMapAttr>(attr.second)) { - MutableAffineMap mMap(mapAttr->getValue(), context); + MutableAffineMap mMap(mapAttr->getValue()); mMap.simplify(); - auto *map = mMap.getAffineMap(); - opStmt->setAttr(attr.first, AffineMapAttr::get(map, context)); + auto map = mMap.getAffineMap(); + opStmt->setAttr(attr.first, AffineMapAttr::get(map)); } } } |

