[PATCH] D32451: Improve profile-guided heuristics to use estimated trip count.

Taewook Oh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 7 21:59:01 PDT 2017


twoh added a comment.

Thanks @Ayal for your comments! If the profile-based trip count checking is moved above the line

  if (MaxTC > 0u && MaxTC < TinyTripCountVectorThreshold) 

, it wouldn't be possible to distinguish the case of static analysis fail to compute MaxTC from the case of profile-based trip count is actually 0. Also, as profile-based numbers are not as definitive as the number from static analysis, I think it might be worth to just optimize for size rather than disable the vectorization. As you mentioned in the comment, OptForSize is effectively same as disabling vectorization for now, but the algorithm for OptForSize case might be changed in the future.

I updated the test per your suggestion.


https://reviews.llvm.org/D32451





More information about the llvm-commits mailing list