[PATCH] D61228: [PowerPC] Set the innermost hot loop(from PGO) to align 32 bytes

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 15:00:40 PDT 2019


hfinkel added a comment.

In D61228#1505513 <https://reviews.llvm.org/D61228#1505513>, @nemanjai wrote:

> > Can you explain why we don't always do this? You're checking for profiling data but then not using it?
>
> I think the idea is that with PGO data, we are more certain that the hotness information is actually meaningful - since the alignment directive will only be emitted for loops that are "hot". Without PGO data, we will align a majority of loops which may be overkill. But this should be clearly stated in the comment though.


Okay, but we just call MBB->getParent()->getFunction().hasProfileData(), where do we actually check that the loop is hot?

Also, even if we align the majority of loops, how much does that really cost us? The code-size impact could be minor compared to the perf improvement, and if so, we should just always do it. It is still true that most users don't use PGO.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61228/new/

https://reviews.llvm.org/D61228





More information about the llvm-commits mailing list