public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: Inbae Jeong <inbae.jeong@gmail.com>
To: jit@gcc.gnu.org
Subject: compiling specific function
Date: Mon, 21 Nov 2022 17:02:56 -0600	[thread overview]
Message-ID: <CAJgaWH2Bd=ztr9LCJ68V+whgm4q-L50PTnxFfPMxTeW=9wXWZQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

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

                 reply	other threads:[~2022-11-21 23:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJgaWH2Bd=ztr9LCJ68V+whgm4q-L50PTnxFfPMxTeW=9wXWZQ@mail.gmail.com' \
    --to=inbae.jeong@gmail.com \
    --cc=jit@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).