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

Ryan Buchner via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 09:57:13 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)) {
----------------
bababuck wrote:

Thanks!

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


More information about the llvm-commits mailing list