[llvm] [SLP] Loop aware cost model/tree building (PR #150450)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 13:15:58 PST 2026


================
@@ -15211,6 +15290,62 @@ TTI::CastContextHint BoUpSLP::getCastContextHint(const TreeEntry &TE) const {
   return TTI::CastContextHint::None;
 }
 
+/// Get the assumed loop trip count for the loop \p L.
+static unsigned getLoopTripCount(const Loop *L, ScalarEvolution &SE) {
+  if (LoopAwareTripCount == 0)
+    return 1;
+  if (unsigned Scale = SE.getSmallConstantTripCount(L)) {
----------------
alexey-bataev wrote:

I think we'll get info from PGO here, if the hints are provided

https://github.com/llvm/llvm-project/pull/150450


More information about the llvm-commits mailing list