This commit introduces an instantiation of LLVM's LoopInfo for CFGs in
MLIR. To test the LoopInfo, a test pass is added the checks the analysis
results for a set of CFGs.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Analysis/LoopInfo.h | ||
---|---|---|
30 ↗ | (On Diff #510011) | I'm not sure if we should move these traits to `mlir/IR/RegionGraphTraits.h" file. |
mlir/include/mlir/Analysis/LoopInfo.h | ||
---|---|---|
1 ↗ | (On Diff #510011) | Nit: I'm confused by how this is an analysis for regions, maybe for region bodies? |
30 ↗ | (On Diff #510011) | Yep, it already has specializations for non-const versions. |
65 ↗ | (On Diff #510011) | Please call this something like BlockLoop or CFGLoop, MLIR has many other kinds of loops and we don't want these things to be confused. Also provide documentation for all top-level entities. |
mlir/lib/Analysis/LoopInfo.cpp | ||
13 ↗ | (On Diff #510011) | Nit: no need to prefix with ::mlir:: within MLIR's proper code base. |
mlir/test/lib/Analysis/TestLoopInfo.cpp | ||
45 ↗ | (On Diff #510011) | Nit: check that the region is not empty and error out gracefully so there's no assertion on unexpected IR. |