forked from OSchip/llvm-project
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
This commit is contained in:
parent
74adaa5b31
commit
99d6ee02b9
|
@ -1179,6 +1179,7 @@ void MemRefAccess::getAccessMap(AffineValueMap *accessMap) const {
|
||||||
memref->getType().getContext());
|
memref->getType().getContext());
|
||||||
SmallVector<Value *, 8> operands(indices.begin(), indices.end());
|
SmallVector<Value *, 8> operands(indices.begin(), indices.end());
|
||||||
fullyComposeAffineMapAndOperands(&map, &operands);
|
fullyComposeAffineMapAndOperands(&map, &operands);
|
||||||
|
canonicalizeMapAndOperands(&map, &operands);
|
||||||
accessMap->reset(map, operands);
|
accessMap->reset(map, operands);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue