[PATCH] D27734: [LoopUnroll] Enable PGO-based loop peeling by default

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 21:05:28 PST 2017


anemet accepted this revision.
anemet added a comment.

> Other than that, the current heuristic doesn't distinguish between hot and cold loops. This is rather unfortunate, but I'm not sure how it can be fixed.
>  Both because using BFI in a loop pass is problematic (hence llvm::getLoopEstimatedTripCount() - although it's also cheaper than computing full BFI just to get the equivalent), and because it's not clear that relative hotness to function entry is the right metric here. Maybe relative hotness to the entire profile?

ProfileSummaryInfo should have this capability.

Anyhow I didn't mean to hold up this patch for this reason; this could be a further improvement on top of this.  LGTM.


https://reviews.llvm.org/D27734





More information about the llvm-commits mailing list