public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Indu Bhagat <indu.bhagat@oracle.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] ctf: Do not warn for CTF not supported for GNU GIMPLE
Date: Wed, 29 Sep 2021 09:14:58 +0200	[thread overview]
Message-ID: <CAFiYyc12m5mOFg1orK2HYOkeCkoYqzbDs1UbFSrqPj1=zNfnsg@mail.gmail.com> (raw)
In-Reply-To: <1632855067-7525-1-git-send-email-indu.bhagat@oracle.com>

On Tue, Sep 28, 2021 at 8:52 PM Indu Bhagat via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> CTF is supported for C only.  Currently, a warning is emitted if the -gctf
> command line option is specified for a non-C frontend.  This warning is also
> used by the GCC testsuite framework - it skips adding -gctf to the list of
> debug flags for automated testing, if CTF is not supported for the frontend.
>
> The following warning, however, is not useful in case of LTO:
>
> "lto1: note: CTF debug info requested, but not supported for ‘GNU GIMPLE’
> 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 = 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 frontend",
> -             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 frontend",
> +               language_string);
>        ctf_debug_info_level = CTFINFO_LEVEL_NONE;
>      }
>
> --
> 1.8.3.1
>

  reply	other threads:[~2021-09-29  7:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 18:51 Indu Bhagat
2021-09-29  7:14 ` Richard Biener [this message]
2021-09-29 15:54   ` Indu Bhagat
2021-09-30  7:27     ` Richard Biener

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='CAFiYyc12m5mOFg1orK2HYOkeCkoYqzbDs1UbFSrqPj1=zNfnsg@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=indu.bhagat@oracle.com \
    /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).