From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 6AF02385843E for ; Mon, 21 Nov 2022 23:03:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6AF02385843E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-x32a.google.com with SMTP id a13-20020a9d6e8d000000b00668d65fc44fso8268566otr.9 for ; Mon, 21 Nov 2022 15:03:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=1wvS2id4QRSv2JbO/4gsyrnZ6vvioNbZzsxeig58O/U=; b=jT/qktMrUEyuaQ0f/SmOi2oZRv6PBbjb2Xb3/B+6mwTTtH77c/e5C9R7OguKROs+hK KV8hXzyirebZJLI9ht/vo+SnVi6DO0RtvAV6kNBg3vJQM+mO06cNUaqW2/QP5cVBR8kp vFCfUQFtWlAK1mpcdg6tb06Le9HrcSGDa7iPBHzOB2ODk4W1jZRkFg9HlJFTyH8UWiYo +3NEwlOunULkkeB3Fh2N3LNiRBpLenWXDY47TZ9j2kDoNV4S2oQBOkQJp+HavmVShnuc Rb4vYanlee0k94OfIvhDxo5pYSj4Z7mOBn9Wkfr9pAmZfGu0wSXdWy4P0ZlgX2ThPnVX zvYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=1wvS2id4QRSv2JbO/4gsyrnZ6vvioNbZzsxeig58O/U=; b=mzb3S7xSjQ2iQGNZWWc3eduId4zloJ+0ZxnJ7Fi+OUK45qW20Y75lyb7gZonWL0oc3 JRRXFMgXc1jr+Ount2ZUYHZ94TdX3mqhuK/XII/yHQpa8bxjfKeK+LuPW6ZBTwpk4sil HViUgynzuOFg344CY08yNYtywIte9VTBwR4EjCs0oz3t1XpCmoxVSo9F+5gRaEPKyA3R ZxXjYzAXxrov+2STx42BIQ7T9dL9e9GCuvj+T5uvHr39aL/aYOs7pw0s8AouAkfMLpq4 d8HM9OWKICq1t0ybVROdrqM/UaJOFzkEDKwObI34oMjIUfRFOC0WoJd8YJHxGSm7xHvY rP5w== X-Gm-Message-State: ANoB5pm9GmtEsX2Vb6wz+9UteaNIewe4wWWbr40ITOl/KFR24Y8za1l7 5Z3dgJk+wd3OHeuiJFP0J4WEAVFLGxWU30Kf1ug7pPXk0OvA+A== X-Google-Smtp-Source: AA0mqf7EiFGfTIIZmpgDNmBxy2BVeqJcFrx4aYMdr2SSUnpq/ocXSJKpt8FJRdQAg+iLbulDFI5sHDj0E/0t3EbrzTc= X-Received: by 2002:a05:6830:4b:b0:66c:50ce:2a2f with SMTP id d11-20020a056830004b00b0066c50ce2a2fmr11499140otp.46.1669071788305; Mon, 21 Nov 2022 15:03:08 -0800 (PST) MIME-Version: 1.0 From: Inbae Jeong Date: Mon, 21 Nov 2022 17:02:56 -0600 Message-ID: Subject: compiling specific function To: jit@gcc.gnu.org Content-Type: multipart/alternative; boundary="0000000000000bf34f05ee030ffe" X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000000bf34f05ee030ffe Content-Type: text/plain; charset="UTF-8" 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 --0000000000000bf34f05ee030ffe--