From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id 360D3385781A; Sun, 12 Feb 2023 01:38:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 360D3385781A 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-pg1-x535.google.com with SMTP id 24so6088501pgt.7; Sat, 11 Feb 2023 17:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=d75ZsEGvC/CgyJTIUPaURKW0NkIkPXk1l6EFpD0lRVc=; b=DJHV2vaglMPtwtda76Z3OwsDfJYt5+ROPuIG38GPJekSXmxfHlHe2s6MF/2AjidbS5 OWj/J8WvT0bxESyumA6IR9ZQAU95/lQMtzvVdy/i6gHhN9dYqW3br2JR+jXtez0USe8x d/7/SEP9wOUJMOULpJxoEsKKFaLIKKybCK5ZTM76rMUB/wMgR/KLovb8ksO0cdtKKpO2 UfppBndxFPbLVN4m/ml2E1CzIqosS15D+cqTUZ24Cxf01klg/acJJt1A0lAQeRrVSgUz r+muBaLcdInCDYEFV+jWtbuII25J1kiG0BQxMKZd+SfZF6LdGaJEZBtZp41DadN2jhBc IE8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d75ZsEGvC/CgyJTIUPaURKW0NkIkPXk1l6EFpD0lRVc=; b=nrex19JoOamSC1h2F1n/lFofCM1HPA8D8MpEf3Qeu027/ayvh5WXBAa4rfLV2io3r3 Dkw21/1DF5UUiUy0PPJDmfvuviORMSrCpCfCGf03igkl++9UvEzf2yo56yytuGCcOA7T VjhEkBqHPEvngqQirFCLNmIdr/ThQ7eBico20ccs2+nmoUD3fxpcVn0J8HM1hKuLpRX+ bzU3p/QGFkVb7k1VAbGhafYI9HK8F3obCR1AY3CqUIYrWQ6+CyQ010zuKRMfTeAcbiXK Z7TqdrIlE2OcUJxgbpzpM0LwlORbvDlDQbNGep2UQ+mxCJqsqzWsPzYD4QpRBnlLWLya aJPw== X-Gm-Message-State: AO0yUKWHpDs3Uj3Y06rG5yvVgktS9zvtT4LzbzcvfgcuTMQ0NPIPf8Au vbD6OQsYpC8fv581qBFKIM6zKM1fGgtsq9xj0z8= X-Google-Smtp-Source: AK7set9j/tr1rHE1ei2JJYZsme9jkuhap1EFkIggDJm5oipAIlS84RAnO4gnO2f7R82GQqV+M1jBCg4rJQgtbejwYTQ= X-Received: by 2002:a63:9912:0:b0:479:1f88:7110 with SMTP id d18-20020a639912000000b004791f887110mr3791124pge.34.1676165885090; Sat, 11 Feb 2023 17:38:05 -0800 (PST) MIME-Version: 1.0 References: <184790403bd8227db4054b9e672afbfdf879dc0c.camel@zoho.com> In-Reply-To: <184790403bd8227db4054b9e672afbfdf879dc0c.camel@zoho.com> From: Andrew Pinski Date: Sat, 11 Feb 2023 17:37:53 -0800 Message-ID: Subject: Re: [PATCH] libgccjit: Add support for machine-dependent builtins To: Antoni Boucher Cc: jit@gcc.gnu.org, gcc-patches@gcc.gnu.org, David Malcolm Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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: On Sat, Feb 11, 2023 at 4:31 PM Antoni Boucher via Gcc-patches wrote: > > Hi. > This patch adds support for machine-dependent builtins in libgccjit > (bug 108762). > > There are two things I don't like in this patch: > > 1. There are a few functions copied from the C frontend > (common_mark_addressable_vec and a few others). > > 2. Getting a target builtin only works from the second compilation > since the type information is recorded at the first compilation. I > couldn't find a way to get the builtin data without using the langhook. > It is necessary to get the type information for type checking and > instrospection. > > Any idea how to fix these issues? Seems like you should do this patch in a few steps; that is split it up. Definitely split out GCC_JIT_TYPE_BFLOAT16 support. I also think the vector support should be in a different patch too. Splitting out these parts would definitely make it easier for review and make incremental improvements. Thanks, Andrew Pinski > > Thanks for the review.