[PATCH] Long NOP padding

David Sehr sehr at google.com
Mon Mar 4 14:06:52 PST 2013


The current X86 NOP padding uses one long NOP followed by the remainder in
one-byte NOPs.  If the processor actually executes those NOPs, as it
sometimes does with aligned bundling, this can have a performance impact.
 From my micro-benchmarks run on my one machine, a 15-byte NOP followed by
twelve one-byte NOPs is about 20% worse than a 15 followed by a 12.  This
patch changes NOP emission to emit as many 15-byte (the maximum) as
possible followed by at most one shorter NOP.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130304/92445722/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: longnop.patch
Type: application/octet-stream
Size: 2430 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130304/92445722/attachment.obj>


More information about the llvm-commits mailing list