public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-5383] IPA: fix reproducibility in IPA MOD REF
Date: Thu, 18 Nov 2021 18:34:42 +0000 (GMT)	[thread overview]
Message-ID: <20211118183442.E86BD385C40A@sourceware.org> (raw)

https://gcc.gnu.org/g:22c242342e38ebffa6bbf7e86e7a1e4abdf0d686

commit r12-5383-g22c242342e38ebffa6bbf7e86e7a1e4abdf0d686
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Nov 18 17:50:19 2021 +0100

    IPA: fix reproducibility in IPA MOD REF
    
    gcc/ChangeLog:
    
            * ipa-modref.c (analyze_function): Do not execute the code
            only if dump_file != NULL.

Diff:
---
 gcc/ipa-modref.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c
index 2c507cc67ab..213343173c5 100644
--- a/gcc/ipa-modref.c
+++ b/gcc/ipa-modref.c
@@ -2880,15 +2880,15 @@ analyze_function (function *f, bool ipa)
 	optimization_summaries = modref_summaries::create_ggc (symtab);
       else /* Remove existing summary if we are re-running the pass.  */
 	{
-	  if (dump_file
-	      && (summary
-		  = optimization_summaries->get (fnode))
-		 != NULL
+	  summary = optimization_summaries->get (fnode);
+	  if (summary != NULL
 	      && summary->loads)
 	    {
-	      fprintf (dump_file, "Past summary:\n");
-	      optimization_summaries->get
-		 (fnode)->dump (dump_file);
+	      if (dump_file)
+		{
+		  fprintf (dump_file, "Past summary:\n");
+		  optimization_summaries->get (fnode)->dump (dump_file);
+		}
 	      past_flags.reserve_exact (summary->arg_flags.length ());
 	      past_flags.splice (summary->arg_flags);
 	      past_retslot_flags = summary->retslot_flags;


                 reply	other threads:[~2021-11-18 18:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20211118183442.E86BD385C40A@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /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).