[PATCH][X86] Don't mark movabsq as cheap-as-move - it isn't that cheap.

Juergen Ributzka juergen at apple.com
Thu Feb 13 16:55:44 PST 2014


On X86 a simple register copy is just 3 bytes, whereas movabsq is a 10 byte instruction. Marking movabsq as not beeing cheap will allow LICM to move it out of the loop and it also prevents unnecessary rematerializations if the value is needed in more than one register.

I run the test-suite and got around 5% improvement for hash2 and health, but they are rather small benchmark and very sensitive to changes. SPEC INT2000 perlbmk improved by ~2.4%.
It also reduced the overall code size for some tiny benchmark up to 10%, but in the context of the whole test-suite the difference is neglegtible.

Cheers,
Juergen


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-X86-Don-t-mark-movabsq-as-cheap-as-move-it-isn-t-tha.patch
Type: application/octet-stream
Size: 1782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140213/83255848/attachment.obj>


More information about the llvm-commits mailing list