[llvm-commits] two-byte return optimization for AMD

Nick Lewycky nicholas at mxc.ca
Sun Dec 7 00:19:53 PST 2008


The AMD optimization manual suggests avoiding branches to 'ret' 
instructions, preferring to emit 'rep; ret'. The attached patch 
implements this.

This doesn't apply very often across llvm-test. The largest is kimwitu++ 
which produces 28 of these two-byte rets. The performance impact seems 
to be less than noise, at least on my system.

Please review!

Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x86-twobyteret.patch
Type: text/x-diff
Size: 8830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20081207/71f2bc7f/attachment.patch>


More information about the llvm-commits mailing list