public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-4384] ipa-modref: Fix dumping
@ 2023-10-03 16:53 Martin Jambor
0 siblings, 0 replies; only message in thread
From: Martin Jambor @ 2023-10-03 16:53 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ed8fe3b1203b936d870d1ab79e66d34f9c955738
commit r14-4384-ged8fe3b1203b936d870d1ab79e66d34f9c955738
Author: Martin Jambor <mjambor@suse.cz>
Date: Tue Oct 3 18:44:52 2023 +0200
ipa-modref: Fix dumping
Function dump_lto_records ought to dump to its parameter OUT but was
dumping expressions to dump_file. This is corrected by this patch and
while at at, I also made the modref_summary::dump member function
const so that it is callable from more contexts.
gcc/ChangeLog:
2023-09-21 Martin Jambor <mjambor@suse.cz>
* ipa-modref.h (modref_summary::dump): Make const.
* ipa-modref.cc (modref_summary::dump): Likewise.
(dump_lto_records): Dump to out instead of dump_file.
Diff:
---
gcc/ipa-modref.cc | 6 +++---
gcc/ipa-modref.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/ipa-modref.cc b/gcc/ipa-modref.cc
index c04f9f44c06..fe55621f007 100644
--- a/gcc/ipa-modref.cc
+++ b/gcc/ipa-modref.cc
@@ -474,7 +474,7 @@ dump_lto_records (modref_records_lto *tt, FILE *out)
FOR_EACH_VEC_SAFE_ELT (tt->bases, i, n)
{
fprintf (out, " Base %i:", (int)i);
- print_generic_expr (dump_file, n->base);
+ print_generic_expr (out, n->base);
fprintf (out, " (alias set %i)\n",
n->base ? get_alias_set (n->base) : 0);
if (n->every_ref)
@@ -487,7 +487,7 @@ dump_lto_records (modref_records_lto *tt, FILE *out)
FOR_EACH_VEC_SAFE_ELT (n->refs, j, r)
{
fprintf (out, " Ref %i:", (int)j);
- print_generic_expr (dump_file, r->ref);
+ print_generic_expr (out, r->ref);
fprintf (out, " (alias set %i)\n",
r->ref ? get_alias_set (r->ref) : 0);
if (r->every_access)
@@ -567,7 +567,7 @@ remove_modref_edge_summaries (cgraph_node *node)
/* Dump summary. */
void
-modref_summary::dump (FILE *out)
+modref_summary::dump (FILE *out) const
{
if (loads)
{
diff --git a/gcc/ipa-modref.h b/gcc/ipa-modref.h
index 2a2d31e86db..f7dedace2da 100644
--- a/gcc/ipa-modref.h
+++ b/gcc/ipa-modref.h
@@ -66,7 +66,7 @@ struct GTY(()) modref_summary
modref_summary ();
~modref_summary ();
- void dump (FILE *);
+ void dump (FILE *) const;
bool useful_p (int ecf_flags, bool check_flags = true);
void finalize (tree);
};
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-03 16:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03 16:53 [gcc r14-4384] ipa-modref: Fix dumping Martin Jambor
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).