From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 8BAE13858404 for ; Wed, 29 Sep 2021 07:15:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8BAE13858404 Received: by mail-ed1-x531.google.com with SMTP id dj4so4863819edb.5 for ; Wed, 29 Sep 2021 00:15:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=lakfTUq3yU/Lnk/krKsBZghTm0iWGxZlV2YMicAOyE0=; b=myPVtIFbP0NFt9GY0sqofqhwBSGeZhVUurN7V+iYcfjCl7jQ1hi5ouOENBTvzBFlbG 4frxKs1WPrz2Ky2lPr6f0+IBXxe5/m/dNZjGFsNB6hDdPWiWHUKKcZ6YCV+3xWeyXYBH /9E8fiDesUUSaZAZrwqpN3POPeV4QjlBr2Cy4e//Mg/SPSOQ3WUTUlsKQ9lWYRpcpBEY c0gVt1PgtUU3/ioFui6zZpQQ6R+C5DthiGLWkqkByqum3XO3+zsXLh0fi3hzp5NiEE8A ZX92FpWB52s4pWZO/qPGygE1AKhVtmEsFVHHinhkjLA2SMYwRGXaHhqWfbPobjtib5/9 JmWg== X-Gm-Message-State: AOAM532mOBI/vgukSAe0SagvFwrLqp44vftajN5gnseWL8OFk2yN73tf CvGeOyaWBgMPaF4xPlzxQ7zNSL2ZrSOwrNz/iFg= X-Google-Smtp-Source: ABdhPJyObQyb4zc+SGRNST98r+2x6ZhmnDVb2XFa5Ctp0AtC6Niqi8gKtn4WEVVkw5tG9M3iXDSjHHawdyuuhpR9OGg= X-Received: by 2002:a50:d903:: with SMTP id t3mr13173499edj.70.1632899709590; Wed, 29 Sep 2021 00:15:09 -0700 (PDT) MIME-Version: 1.0 References: <1632855067-7525-1-git-send-email-indu.bhagat@oracle.com> In-Reply-To: <1632855067-7525-1-git-send-email-indu.bhagat@oracle.com> From: Richard Biener Date: Wed, 29 Sep 2021 09:14:58 +0200 Message-ID: Subject: Re: [PATCH] ctf: Do not warn for CTF not supported for GNU GIMPLE To: Indu Bhagat Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2021 07:15:12 -0000 On Tue, Sep 28, 2021 at 8:52 PM Indu Bhagat via Gcc-patches wrote: > > CTF is supported for C only. Currently, a warning is emitted if the -gct= f > command line option is specified for a non-C frontend. This warning is a= lso > used by the GCC testsuite framework - it skips adding -gctf to the list o= f > debug flags for automated testing, if CTF is not supported for the fronte= nd. > > The following warning, however, is not useful in case of LTO: > > "lto1: note: CTF debug info requested, but not supported for =E2=80=98GNU= GIMPLE=E2=80=99 > frontend" > > This patch disables the generation of the above warning for GNU GIMPLE. > > Bootstrapped and regression tested on x86_64. > > gcc/ChangeLog: > > * toplev.c (process_options): Do not warn for GNU GIMPLE. > --- > gcc/toplev.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/gcc/toplev.c b/gcc/toplev.c > index e1688aa..511a343 100644 > --- a/gcc/toplev.c > +++ b/gcc/toplev.c > @@ -1416,14 +1416,16 @@ process_options (void) > debug_info_level =3D DINFO_LEVEL_NONE; > } > > - /* CTF is supported for only C at this time. > - Compiling with -flto results in frontend language of GNU GIMPLE. *= / > + /* CTF is supported for only C at this time. */ > if (!lang_GNU_C () > && ctf_debug_info_level > CTFINFO_LEVEL_NONE) > { > - inform (UNKNOWN_LOCATION, > - "CTF debug info requested, but not supported for %qs fronte= nd", > - language_string); > + /* Compiling with -flto results in frontend language of GNU GIMPLE= . It > + is not useful to warn in that case. */ > + if (!startswith (lang_hooks.name, "GNU GIMPLE")) please use in_lto_p instead OK with that change. > + inform (UNKNOWN_LOCATION, > + "CTF debug info requested, but not supported for %qs fron= tend", > + language_string); > ctf_debug_info_level =3D CTFINFO_LEVEL_NONE; > } > > -- > 1.8.3.1 >