]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ipa-sra: Dump edge summaries also for non-candidates
authorMartin Jambor <mjambor@suse.cz>
Tue, 22 Nov 2022 17:22:03 +0000 (18:22 +0100)
committerMartin Jambor <mjambor@suse.cz>
Tue, 22 Nov 2022 17:29:24 +0000 (18:29 +0100)
This should have been part of r12-578-g717d278af93a4a.  Call edge
summaries provide information required for IPA-SRA transformations in
the callees but are generated when analyzing callers and thus also
callers which are not IPA-SRA candidates themselves.  Therefore we
analyze them but don't dump them, which makes the dumops quite
incomplete. This patch fixes that.

gcc/ChangeLog:

2021-12-14  Martin Jambor  <mjambor@suse.cz>

* ipa-sra.cc (ipa_sra_dump_all_summaries): Dump edge summaries even
for non-candidates.

gcc/ipa-sra.cc

index 2237ac6d92f2f37fe6a77d09069ab434fe40d389..718201d27faa42136ba01a187e7455b0560a9d2c 100644 (file)
@@ -2805,13 +2805,10 @@ ipa_sra_dump_all_summaries (FILE *f)
       if (!ifs)
        fprintf (f, "  Function does not have any associated IPA-SRA "
                 "summary\n");
+      else if (!ifs->m_candidate)
+       fprintf (f, "  Not a candidate function\n");
       else
        {
-         if (!ifs->m_candidate)
-           {
-             fprintf (f, "  Not a candidate function\n");
-             continue;
-           }
          if (ifs->m_returns_value)
            fprintf (f, "  Returns value\n");
          if (vec_safe_is_empty (ifs->m_parameters))