[LLVMdev] [RFC] [X86] Mov to push transformation in x86-32 call sequences

Chris Lattner clattner at apple.com
Sun Dec 21 23:03:14 PST 2014


> On Dec 21, 2014, at 12:58 AM, Herbie Robinson <HerbieRobinson at verizon.net> wrote:
> 
> According to the Intel performance guidelines, pushes are significantly slower than moves to the extent they should be avoided as much as possible.  It's been a decade since I was dealing with this; so, I don't remember the numbers, but I'm pretty sure the changes you are proposing will slow the code down.
> 
> People who care about speed more than code size are probably not going to like this very much…

Very true (and confirmed downthread), but this code size optimization is still very interesting for functions using the minsize function attribute, which is specifically designed to favor code size over performance:
http://llvm.org/docs/LangRef.html#function-attributes <http://llvm.org/docs/LangRef.html#function-attributes>

The linux kernel folks really care about the size of the bootloader, for example.

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141221/18936769/attachment.html>


More information about the llvm-dev mailing list