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(refs/users/marxin/heads/fix-modref-dump-dependency)] IPA: use cgraph_node instance Date: Thu, 18 Nov 2021 16:50:53 +0000 (GMT) [thread overview] Message-ID: <20211118165053.697B63857814@sourceware.org> (raw) https://gcc.gnu.org/g:8663b4d93bae55e2e427ed77efea5cfae8a55d9c commit 8663b4d93bae55e2e427ed77efea5cfae8a55d9c Author: Martin Liska <mliska@suse.cz> Date: Thu Nov 18 17:39:23 2021 +0100 IPA: use cgraph_node instance gcc/ChangeLog: * ipa-modref.c (analyze_function): Use fnode instead of repeated cgraph_node::get (current_function_decl). Diff: --- gcc/ipa-modref.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c index c94f0589d44..a3c7c6d6a1f 100644 --- a/gcc/ipa-modref.c +++ b/gcc/ipa-modref.c @@ -2870,22 +2870,22 @@ analyze_function (function *f, bool ipa) { if (dump_file && (summary - = optimization_summaries->get (cgraph_node::get (f->decl))) + = optimization_summaries->get (fnode)) != NULL && summary->loads) { fprintf (dump_file, "Past summary:\n"); optimization_summaries->get - (cgraph_node::get (f->decl))->dump (dump_file); + (fnode)->dump (dump_file); past_flags.reserve_exact (summary->arg_flags.length ()); past_flags.splice (summary->arg_flags); past_retslot_flags = summary->retslot_flags; past_static_chain_flags = summary->static_chain_flags; past_flags_known = true; } - optimization_summaries->remove (cgraph_node::get (f->decl)); + optimization_summaries->remove (fnode); } - summary = optimization_summaries->get_create (cgraph_node::get (f->decl)); + summary = optimization_summaries->get_create (fnode); gcc_checking_assert (nolto && !lto); } /* In IPA mode we analyze every function precisely once. Assert that. */ @@ -2896,16 +2896,16 @@ analyze_function (function *f, bool ipa) if (!summaries) summaries = modref_summaries::create_ggc (symtab); else - summaries->remove (cgraph_node::get (f->decl)); - summary = summaries->get_create (cgraph_node::get (f->decl)); + summaries->remove (fnode); + summary = summaries->get_create (fnode); } if (lto) { if (!summaries_lto) summaries_lto = modref_summaries_lto::create_ggc (symtab); else - summaries_lto->remove (cgraph_node::get (f->decl)); - summary_lto = summaries_lto->get_create (cgraph_node::get (f->decl)); + summaries_lto->remove (fnode); + summary_lto = summaries_lto->get_create (fnode); } if (!fnspec_summaries) fnspec_summaries = new fnspec_summaries_t (symtab); @@ -3024,13 +3024,11 @@ analyze_function (function *f, bool ipa) { if (!summary->loads->every_base && !summary->loads->bases && !summary->calls_interposable) - fixup_cfg = ipa_make_function_const - (cgraph_node::get (current_function_decl), - summary->side_effects, true); + fixup_cfg = ipa_make_function_const (fnode, + summary->side_effects, true); else - fixup_cfg = ipa_make_function_pure - (cgraph_node::get (current_function_decl), - summary->side_effects, true); + fixup_cfg = ipa_make_function_pure (fnode, + summary->side_effects, true); } } if (summary && !summary->useful_p (ecf_flags))
reply other threads:[~2021-11-18 16:50 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=20211118165053.697B63857814@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: linkBe 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).