[MLIR] Generalize Affine dependence analysis using Affine Relations
This patch removes code very specific to affine dependence analysis and refactors it as a FlatAfffineRelation. A FlatAffineRelation represents a set of ordered pairs (domain -> range) where "domain" and "range" are tuples of identifiers. These relations are used to represent an "access relation" for memory access on a memref. An access relation maps elements of an iteration domain to the element(s) of an array domain accessed by that iteration of the associated statement through some array reference. The dependence relation representing the dependence constraints between two memory accesses can be built by composing the access relation of the destination access by the inverse of the access relation of source access. This patch does not change the functionality of the existing dependence analysis in checkMemrefAccessDependence, but refactors it to use FlatAffineRelations to deduplicate code and enable code reuse for future development of features like scheduling, value-based dependence analysis, etc. Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D110563
Loading
Please register or sign in to comment