[llvm] [SLP] Loop aware cost model/tree building (PR #150450)
Joel E. Denny via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 09:55:23 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)) {
----------------
jdenny-ornl wrote:
Just have to add the various metadata, like `!prof`.
https://github.com/llvm/llvm-project/pull/150450
More information about the llvm-commits
mailing list