[PATCH] D34393: Adding code padding for performance stability - infrastructure

Omer Paparo Bivas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 20 07:30:09 PDT 2017


opaparo added a comment.

In https://reviews.llvm.org/D34393#844569, @davidxl wrote:

> Tried the two patches with our internal benchmark -- the alignment related performance issue is still there.  The problem disappears with -mllvm -x86-experimental-pref-loop-alignment=5 is used.


I can think of two reasons that might have caused the patch to fail to help you:

1. This optimization is not enabled for all architectures. Use -target-cpu to specify the target (if you haven't already) to make sure you are compiling for the desired architecture, which will enable the optimization (if relevant). See the constructor of X86MCCodePadder for the list of architectures for which the optimization is enabled.
2. You might have encountered a different alignment issue than the one handled by this patch. I will send you soon another patch (which was not yet uploaded for review) that addresses another alignment issue (in addition to the first one), which will hopefully handle your case. Regardless of the results you'll get, could you send a small reproducer for this problem? I would like to investigate it and see the kind of alignment issue we are facing here.




https://reviews.llvm.org/D34393





More information about the llvm-commits mailing list