diff options
author | Martin Liska <mliska@suse.cz> | 2021-11-18 17:50:19 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-11-18 19:34:13 +0100 |
commit | 22c242342e38ebffa6bbf7e86e7a1e4abdf0d686 (patch) | |
tree | a032df22f4053de9eec281d937ca5e200fbfa59b | |
parent | 616ca1024a79c6a1935ea152051b9016d2142fb6 (diff) | |
download | gcc-22c242342e38ebffa6bbf7e86e7a1e4abdf0d686.zip gcc-22c242342e38ebffa6bbf7e86e7a1e4abdf0d686.tar.gz gcc-22c242342e38ebffa6bbf7e86e7a1e4abdf0d686.tar.bz2 |
IPA: fix reproducibility in IPA MOD REF
gcc/ChangeLog:
* ipa-modref.c (analyze_function): Do not execute the code
only if dump_file != NULL.
-rw-r--r-- | gcc/ipa-modref.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c index 2c507cc..2133431 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; |