diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2023-10-16 18:35:26 -0400 |
|---|---|---|
| committer | Alan Wu <XrXr@users.noreply.github.com> | 2023-11-07 17:43:43 -0500 |
| commit | a1c61f0ae5f5ecaa7d8289942b78e6b0c77118fe (patch) | |
| tree | 34ce4467e77196c9e6fc842f39b7bae0d8cd62c5 /include/ruby/ruby.h | |
| parent | aa6642de630cfc10063154d84e45a7bff30e9103 (diff) | |
YJIT: Use u32 for CodePtr to save 4 bytes each
We've long had a size restriction on the code memory region such that a
u32 could refer to everything. This commit capitalizes on this
restriction by shrinking the size of `CodePtr` to be 4 bytes from 8.
To derive a full raw pointer from a `CodePtr`, one needs a base pointer.
Both `CodeBlock` and `VirtualMemory` can be used for this purpose. The
base pointer is readily available everywhere, except for in the case of
the `jit_return` "branch". Generalize lea_label() to lea_jump_target()
in the IR to delay deriving the `jit_return` address until `compile()`,
when the base pointer is available.
On railsbench, this yields roughly a 1% reduction to `yjit_alloc_size`
(58,397,765 to 57,742,248).
Diffstat (limited to 'include/ruby/ruby.h')
0 files changed, 0 insertions, 0 deletions
