public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: "Kewen.Lin" <linkw@linux.ibm.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Richard Biener <richard.guenther@gmail.com>,
	Jakub Jelinek <jakub@redhat.com>, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH] inline: Rebuild target option node for caller [PR105459]
Date: Fri, 8 Jul 2022 13:37:19 +0200	[thread overview]
Message-ID: <15318be4-ac2d-5ca4-d39e-94fd6248f646@suse.cz> (raw)
In-Reply-To: <75d4b8f9-5ed2-de4c-d606-510a66714c9a@linux.ibm.com>

On 6/6/22 08:20, Kewen.Lin wrote:
> |Hi, PR105459 exposes one issue in inline_call handling that when it decides to copy FP flags from callee to caller and rebuild the optimization node for caller fndecl, it's possible that the target option node is also necessary to be rebuilt. Without updating target option node early, it can make nodes share the same target option node wrongly, later when we want to unshare it somewhere (like in target hook) it can get unexpected results, like ICE on uninitialized secondary member of target globals exposed in this PR.|


Hello.

I think your patch seems reasonable. As you mentioned we need to keep
pair of target and optimization nodes together and the only correct way
is by using build_target_option_node for the DECL_FUNCTION_SPECIFIC_TARGET.

Thanks for the fix.
Martin

  parent reply	other threads:[~2022-07-08 11:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06  6:20 Kewen.Lin
2022-06-23  2:03 ` PING^1 " Kewen.Lin
2022-07-01  8:40   ` Richard Biener
2022-07-01  9:20     ` Jan Hubicka
2022-07-01 12:09       ` Richard Biener
2022-07-01  9:42     ` Kewen.Lin
2022-07-08 11:37 ` Martin Liška [this message]
2022-07-11  3:37   ` Kewen.Lin

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=15318be4-ac2d-5ca4-d39e-94fd6248f646@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=jakub@redhat.com \
    --cc=linkw@linux.ibm.com \
    --cc=richard.guenther@gmail.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).