[PATCH] libgccjit: Fix get_size of size_t

Antoni Boucher bouanto@zoho.com
Thu Dec 7 22:26:01 GMT 2023


Hi.
This patch fixes getting the size of size_t (bug 112910).

There's one issue with this patch: like every other feature that checks
for target-specific stuff, it requires a compilation before actually
fetching the size of the type.
Which means that getting the size before a compilation might be wrong
(and I actually believe is wrong on x86-64).

I was wondering if we should always implicitely do the first
compilation to gather the correct info: this would fix this issue and
all the others that we have due to that.
I'm not sure what would be the performance implication.

Another solution that I have been thinking about for a while now would
be to have another frontend libgccaot (I don't like that name), which
is like libgccjit but removes the JIT part so that we get access to the
target stuff directly and would remove the need for having a seperation
between recording and playback as far as I understand.
That's a long-term solution, but I wanted to share the idea now and
gather your thoughts on that.

Thanks for the review.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libgccjit-Fix-get_size-of-size_t.patch
Type: text/x-patch
Size: 1911 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/jit/attachments/20231207/ffcc6efb/attachment.bin>


More information about the Jit mailing list