JIT code model - please review

Demikhovsky, Elena elena.demikhovsky at intel.com
Mon Jul 8 02:09:56 PDT 2013


I'm adding one more code model to solve the following problem:

In X86_64 target the Code Model is "Large". It means that address is 64-bit and IP-relative memory operand can't be used in this case.
(Because in IP-relative memory operand the displacement is 32-bit).

In order to load constant, we use 2 instructions.
movabsq $.LCPI0_0, %rcx
vmulpd  (%rcx), %ymm0, %ymm0

It happens because .LCPI0_0 is in .rodata section and instruction itself is in .text.

If I put the constant in .text, the code will look much better:
vmulpd  .LCPI0_0(%rip), %ymm0, %ymm0


I define one more Code Model called "LargeJIT", which will allows to put constants in .text.
This code model is set instead of CodeModel::Large when user defines the JITDefault mode.

Please review.

Thank you.

-        Elena



---------------------------------------------------------------------
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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130708/540340c7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: codemodel.diff
Type: application/octet-stream
Size: 10323 bytes
Desc: codemodel.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130708/540340c7/attachment.obj>


More information about the llvm-commits mailing list