[MLIR] FlatAffineConstraints: Ensure dimensionalities match when calling mergeLocalIds
authorGroverkss <groverkss@gmail.com>
Sat, 30 Oct 2021 12:09:03 +0000 (17:39 +0530)
committerGroverkss <groverkss@gmail.com>
Sat, 30 Oct 2021 12:09:27 +0000 (17:39 +0530)
commit3be3c944a5bacfd208b56853941b0fa4dec3ddcc
treea0050a6d3b72f4c909f0c05684c2c877574ca0c5
parent4cf9d1e4492fe70768d13fba5fbb61d9d93adf5c
[MLIR] FlatAffineConstraints: Ensure dimensionalities match when calling mergeLocalIds

This patch reorders mergeLocalIds usage to merge locals only after number of
dimensions and symbols are same. This does not change any functionality
because it does not matter in what order identifiers are merged, since
the reason to do it is to ensure that two FACs are aligned.

The order ensured in this patch simplifies a subsequent patch to improve
mergeLocalIds which requires dimensions and symbols to be aligned.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D112841
mlir/include/mlir/Analysis/AffineStructures.h
mlir/lib/Analysis/AffineAnalysis.cpp
mlir/lib/Analysis/AffineStructures.cpp