public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5541] Minor ipa-modref tweaks
@ 2021-11-26 12:55 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2021-11-26 12:55 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:2cadaa1f134beca5ec63544f185362c223bab590
commit r12-5541-g2cadaa1f134beca5ec63544f185362c223bab590
Author: Jan Hubicka <jh@suse.cz>
Date: Fri Nov 26 13:54:41 2021 +0100
Minor ipa-modref tweaks
To make dumps easier to read modref now dumps cgraph_node name rather then
cfun name in function being analysed and I also fixed minor issue with ECF
flags merging when updating inline summary.
gcc/ChangeLog:
2021-11-26 Jan Hubicka <hubicka@ucw.cz>
* ipa-modref.c (analyze_function): Drop parameter F and dump
cgraph node name rather than cfun name.
(modref_generate): Update.
(modref_summaries::insert):Update.
(modref_summaries_lto::insert):Update.
(pass_modref::execute):Update.
(ipa_merge_modref_summary_after_inlining): Improve combining of
ECF_FLAGS.
Diff:
---
gcc/ipa-modref.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c
index 2f52d41aa48..9e537b04196 100644
--- a/gcc/ipa-modref.c
+++ b/gcc/ipa-modref.c
@@ -2943,17 +2943,17 @@ analyze_parms (modref_summary *summary, modref_summary_lto *summary_lto,
}
}
-/* Analyze function F. IPA indicates whether we're running in local mode
+/* Analyze function. IPA indicates whether we're running in local mode
(false) or the IPA mode (true).
Return true if fixup cfg is needed after the pass. */
static bool
-analyze_function (function *f, bool ipa)
+analyze_function (bool ipa)
{
bool fixup_cfg = false;
if (dump_file)
- fprintf (dump_file, "modref analyzing '%s' (ipa=%i)%s%s\n",
- function_name (f), ipa,
+ fprintf (dump_file, "\n\nmodref analyzing '%s' (ipa=%i)%s%s\n",
+ cgraph_node::get (current_function_decl)->dump_name (), ipa,
TREE_READONLY (current_function_decl) ? " (const)" : "",
DECL_PURE_P (current_function_decl) ? " (pure)" : "");
@@ -3224,7 +3224,7 @@ modref_generate (void)
if (!f)
continue;
push_cfun (f);
- analyze_function (f, true);
+ analyze_function (true);
pop_cfun ();
}
}
@@ -3257,7 +3257,7 @@ modref_summaries::insert (struct cgraph_node *node, modref_summary *)
return;
}
push_cfun (DECL_STRUCT_FUNCTION (node->decl));
- analyze_function (DECL_STRUCT_FUNCTION (node->decl), true);
+ analyze_function (true);
pop_cfun ();
}
@@ -3277,7 +3277,7 @@ modref_summaries_lto::insert (struct cgraph_node *node, modref_summary_lto *)
return;
}
push_cfun (DECL_STRUCT_FUNCTION (node->decl));
- analyze_function (DECL_STRUCT_FUNCTION (node->decl), true);
+ analyze_function (true);
pop_cfun ();
}
@@ -4032,9 +4032,9 @@ public:
}
-unsigned int pass_modref::execute (function *f)
+unsigned int pass_modref::execute (function *)
{
- if (analyze_function (f, false))
+ if (analyze_function (false))
return execute_fixup_cfg ();
return 0;
}
@@ -5106,8 +5106,10 @@ ipa_merge_modref_summary_after_inlining (cgraph_edge *edge)
= summaries_lto ? summaries_lto->get (edge->callee) : NULL;
int flags = flags_from_decl_or_type (edge->callee->decl);
/* Combine in outer flags. */
- for (cgraph_node *n = edge->caller; n->inlined_to; n = n->callers->caller)
- flags |= flags_from_decl_or_type (edge->callee->decl);
+ cgraph_node *n;
+ for (n = edge->caller; n->inlined_to; n = n->callers->caller)
+ flags |= flags_from_decl_or_type (n->decl);
+ flags |= flags_from_decl_or_type (n->decl);
bool ignore_stores = ignore_stores_p (edge->caller->decl, flags);
if (!callee_info && to_info)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-26 12:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-26 12:55 [gcc r12-5541] Minor ipa-modref tweaks Jan Hubicka
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).