[MLIR][Affine] Fix/complete access index invariance, add isInvariantAccess (#84602) isAccessIndexInvariant had outdated code and didn't handle IR with multiple affine.apply ops, which is inconvenient when used as a utility. This is addressed by switching to use the proper API on AffineValueMap. Add mlir::affine::isInvariantAccess exposed for outside use and tested via the test pass. Add a method on AffineValueMap. Add test cases to exercise simplification and composition for invariant access analysis. A TODO/FIXME has been added but this issue existed before.
[MLIR] Clean up pass options for test-loop-fusion and affine-super-vectorizer-test (#87606) Before the change test-loop-fusion and affine-super-vectorizer-test options were in their own category. This was because they used the standard llvm command line parsing with llvm::cl::opt. This PR moves them over to the mlir Pass::Option class. Before the change $ mlir-opt --help ... General options: ... Compiler passes to run Passes: ... Pass Pipelines: ... Generic Options: .... affine-super-vectorizer-test options: --backward-slicing ... --vectorize-affine-loop-nest test-loop-fusion options: --test-loop-fusion-dependence-check ... --test-loop-fusion-transformation After the change $ mlir-opt --help ... General options: ... Compiler passes to run Passes: ... --affine-super-vectorizer-test --backward-slicing ... --vectorize-affine-loop-nest ... --test-loop-fusion options: --test-loop-fusion-dependence-check ... --test-loop-fusion-transformation ... Pass Pipelines: ... Generic Options: ... --------- Signed-off-by: philass <plassen@groq.com>
[mlir][test] Reorganize the test dialect (#89424) This PR massively reorganizes the Test dialect's source files. It moves manually-written op hooks into TestOpDefs.cpp, moves format custom directive parsers and printers into TestFormatUtils, adds missing comment blocks, and moves around where generated source files are included for types, attributes, enums, etc. into their own source file. This will hopefully help navigate the test dialect source code, but also speeds up compile time of the test dialect by putting generated source files into separate compilation units. This also sets up the test dialect to shard its op definitions, done in the next PR.
[MLIR] Clean up pass options for test-loop-fusion and affine-super-vectorizer-test (#87606) Before the change test-loop-fusion and affine-super-vectorizer-test options were in their own category. This was because they used the standard llvm command line parsing with llvm::cl::opt. This PR moves them over to the mlir Pass::Option class. Before the change $ mlir-opt --help ... General options: ... Compiler passes to run Passes: ... Pass Pipelines: ... Generic Options: .... affine-super-vectorizer-test options: --backward-slicing ... --vectorize-affine-loop-nest test-loop-fusion options: --test-loop-fusion-dependence-check ... --test-loop-fusion-transformation After the change $ mlir-opt --help ... General options: ... Compiler passes to run Passes: ... --affine-super-vectorizer-test --backward-slicing ... --vectorize-affine-loop-nest ... --test-loop-fusion options: --test-loop-fusion-dependence-check ... --test-loop-fusion-transformation ... Pass Pipelines: ... Generic Options: ... --------- Signed-off-by: philass <plassen@groq.com>