D34393: Adding code padding for performance stability - infrastructure

Paparo Bivas, Omer via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 20 07:35:08 PDT 2017


Hi,

Attached is the said patch (CodePadding_x86.patch). I'm also attaching the infrastructure patch it relies on (CodePadding_inf.patch), which is identical to the one I've sent a few days ago.

Thanks,
Omer

-----Original Message-----
From: Omer Paparo Bivas via Phabricator [mailto:reviews at reviews.llvm.org] 
Sent: Sunday, August 20, 2017 17:30
To: Paparo Bivas, Omer <omer.paparo.bivas at intel.com>; Aboud, Amjad <amjad.aboud at intel.com>; Rackover, Zvi <zvi.rackover at intel.com>; Ansari, Zia <zia.ansari at intel.com>; craig.topper at gmail.com; rafael.espindola at gmail.com
Cc: Elovikov, Andrei <andrei.elovikov at intel.com>; gberry at codeaurora.org; wmi at google.com; eraman at google.com; kyle+llvm at iteratee.net; chandlerc at gmail.com; davidxl at google.com; llvm-dev at redking.me.uk; simon.dardis at imgtec.com; mgorny at gentoo.org; javed.absar at arm.com; llvm-commits at lists.llvm.org; Ben Simhon, Oren <oren.ben.simhon at intel.com>; Saba, Lama <lama.saba at intel.com>
Subject: [PATCH] D34393: Adding code padding for performance stability - infrastructure

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



---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CodePadding_x86.patch
Type: application/octet-stream
Size: 64318 bytes
Desc: CodePadding_x86.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170820/fcb9038b/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CodePadding_inf.patch
Type: application/octet-stream
Size: 395008 bytes
Desc: CodePadding_inf.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170820/fcb9038b/attachment-0003.obj>


More information about the llvm-commits mailing list