diff options
| author | Uday Bondhugula <bondhugula@google.com> | 2019-02-04 13:33:51 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 16:12:08 -0700 |
| commit | 99d6ee02b98b28fb6501e5ae805842a20b94ec4c (patch) | |
| tree | ca099d66bdced6068c7f45c935defe33ef734288 /mlir/lib/Analysis/AffineAnalysis.cpp | |
| parent | 74adaa5b3153c93e87cecbb230bb6b2b04854477 (diff) | |
| download | bcm5719-llvm-99d6ee02b98b28fb6501e5ae805842a20b94ec4c.tar.gz bcm5719-llvm-99d6ee02b98b28fb6501e5ae805842a20b94ec4c.zip | |
Update MemRefAccess::getAccessMap to always canonicalize map + operands
- with this we won't see duplicate / unused operands when getting access maps,
or when constructing FlatAffineConstraints based on such maps
- we can probably change fullyComposeAffineMapAndOperands to ensure this
TODO(b/123879896).
PiperOrigin-RevId: 232356600
Diffstat (limited to 'mlir/lib/Analysis/AffineAnalysis.cpp')
| -rw-r--r-- | mlir/lib/Analysis/AffineAnalysis.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mlir/lib/Analysis/AffineAnalysis.cpp b/mlir/lib/Analysis/AffineAnalysis.cpp index 0936798d71a..fafa5126939 100644 --- a/mlir/lib/Analysis/AffineAnalysis.cpp +++ b/mlir/lib/Analysis/AffineAnalysis.cpp @@ -1179,6 +1179,7 @@ void MemRefAccess::getAccessMap(AffineValueMap *accessMap) const { memref->getType().getContext()); SmallVector<Value *, 8> operands(indices.begin(), indices.end()); fullyComposeAffineMapAndOperands(&map, &operands); + canonicalizeMapAndOperands(&map, &operands); accessMap->reset(map, operands); } |

