[PATCH] D138368: [MLGO] Add LoopPropertiesAnalysis pass

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 27 13:11:48 PST 2022


jdoerfert added a comment.

Generally looks good. Two minor comments.



================
Comment at: llvm/include/llvm/Analysis/LoopPropertiesAnalysis.h:51
+  bool IsLoopBackEdgeConstant = false;
+  APInt LoopBackEdgeCount;
+
----------------
This bool and the one above are not strictly needed, one can just check the size and APInt for their value.


================
Comment at: llvm/lib/Analysis/LoopPropertiesAnalysis.cpp:72
+    }
+  }
+
----------------
It is probably better to do the checks via `isa<CastInst>` and similar. New stuff is added and this seems hard to maintain.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138368/new/

https://reviews.llvm.org/D138368



More information about the llvm-commits mailing list