public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com>
To: Andi Kleen <ak@linux.intel.com>,
	Eugene Rozenfeld via Gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Jan Hubicka <hubicka@ucw.cz>
Subject: RE: [EXTERNAL] Re: [PATCH] Add instruction level discriminator support.
Date: Sun, 12 Jun 2022 23:56:37 +0000	[thread overview]
Message-ID: <MW2PR2101MB17705826E04D0EC97A0AFCCF91A89@MW2PR2101MB1770.namprd21.prod.outlook.com> (raw)
In-Reply-To: <87pmjdfngv.fsf@linux.intel.com>

Thank you for the review Andi.

Yes, the corresponding reader change is

@@ -15671,8 +15673,9 @@ module_state::read_location (bytes_in &sec) const
 	if (range.m_start == UNKNOWN_LOCATION)
 	  range.m_start = locus;
 	range.m_finish = read_location (sec);
+	unsigned discriminator = sec.u ();
 	if (locus != loc && range.m_start != loc && range.m_finish != loc)
-	  locus = get_combined_adhoc_loc (line_table, locus, range, NULL);
+	  locus = get_combined_adhoc_loc (line_table, locus, range, NULL, discriminator);
       }
       break;

-----Original Message-----
From: Andi Kleen <ak@linux.intel.com> 
Sent: Sunday, June 12, 2022 4:53 PM
To: Eugene Rozenfeld via Gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Jan Hubicka <hubicka@ucw.cz>; Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com>
Subject: [EXTERNAL] Re: [PATCH] Add instruction level discriminator support.

Eugene Rozenfeld via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
>      {
> diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 
> d1dc73724d1..5ed6b7b0f94 100644
> --- a/gcc/cp/module.cc
> +++ b/gcc/cp/module.cc
> @@ -15587,6 +15587,8 @@ module_state::write_location (bytes_out &sec, location_t loc)
>  	range.m_start = UNKNOWN_LOCATION;
>        write_location (sec, range.m_start);
>        write_location (sec, range.m_finish);
> +      unsigned discriminator = get_discriminator_from_adhoc_loc (line_table, loc);
> +      sec.u (discriminator);

I hope this has a corresponding reader change, wasn't fully clear. Should it use some common function?

The patch looks good to me, but I cannot approve.

-Andi

      reply	other threads:[~2022-06-12 23:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02  7:21 Eugene Rozenfeld
2022-06-12 23:53 ` Andi Kleen
2022-06-12 23:56   ` Eugene Rozenfeld [this message]

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=MW2PR2101MB17705826E04D0EC97A0AFCCF91A89@MW2PR2101MB1770.namprd21.prod.outlook.com \
    --to=eugene.rozenfeld@microsoft.com \
    --cc=ak@linux.intel.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    /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).