This pass mimics FunctionPropertiesAnalysis.
The analysis will be used to extract features from loop. The follow-up
patches will be extending MLGO onto helping the loop partial unroll
decision, using this pass to extract features of a loop.
Paths
| Differential D138368
[MLGO] Add LoopPropertiesAnalysis pass Needs ReviewPublic Authored by eopXD on Nov 19 2022, 4:38 PM.
Details
Diff Detail
Unit TestsFailed Event TimelineeopXD retitled this revision from [MLGO] Add LoopPropertiesAnalysis and its printer pass to [MLGO] Add LoopPropertiesAnalysis pass.Nov 19 2022, 4:55 PM eopXD added a child revision: D138369: [MLGO][LoopUnroll] Add logging mechanism for loop partial unroll.Nov 19 2022, 5:51 PM Comment Actions Generally looks good. Two minor comments.
Revision Contents
Diff 485222 llvm/include/llvm/Analysis/LoopPropertiesAnalysis.h
llvm/lib/Analysis/CMakeLists.txt
llvm/lib/Analysis/LoopPropertiesAnalysis.cpp
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/unittests/Analysis/CMakeLists.txt
llvm/unittests/Analysis/LoopPropertiesAnalysisTest.cpp
|
This bool and the one above are not strictly needed, one can just check the size and APInt for their value.