compiling specific function

Inbae Jeong inbae.jeong@gmail.com
Mon Nov 21 23:02:56 GMT 2022


Hi,

I'm trying to use gccjit for my interpreter.

Let's say that I have two functions f1 and f2, both are called
frequently enough to be jit'ed, and f2 calls f1 inside.

When f1 is found, I add it to the context, compile it, and use it.
When f2 is found later, I add it to the context, compile it hoping that f1
is inlined in f2.

As more hotspots are found, the context gets bigger and bigger and it takes
longer to compile the context.

I tried child contexts but it doesn't seem to work in this case; I have to
jit both f1 and f2 when I try to jit f2 in its own child context.

I hope that it's possible to move gcc_jit_function to the parent context, or
is it possible to compile only a specific function in a context?

Thanks,
Inbae


More information about the Jit mailing list