These changes provide a development framework for the development of aliasing analysis in flang which will depend on the FIR dialect.
See https://github.com/llvm/llvm-project/blob/main/flang/docs/AliasingAnalysisFIR.md and https://discourse.llvm.org/t/alias-analysis-in-llvm-flang/62639/16
There is an emphasis on reusing/leveraging the mlir::AliasAnalysis and the MLIR testing passes for alias analysis.
There are no substantial changes in MLIR other than sharing code between test passes through a base class the passes can inherit from.
There might need to be more changes in MLIR in the future but I did not want these to be lost in this noise.
With these changes we will explore the possibility of stacking up several alias analysis with mlir::AliasAnalysis::addAnalysisImplementation
Changes include:
- Adding an Analysis/AliasAnalysis directory in flang which right now is doing a mock alias analysis
- Adding a lib directory under flang/test to allow for test passes to be built.
- Registering the test passes with fir-opt. Mimicking what is done with mlir-opt
- Moved the MLIR testing code into a common based class that can be reused among passes
Did you intend for the parenthesis to wrap sizeof() / sizeof() instead of just the second sizeof ?