public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Macleod <amacleod@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1052] Adjust fur_source internal api to use gori_compute not ranger_cache. Date: Tue, 25 May 2021 23:29:59 +0000 (GMT) [thread overview] Message-ID: <20210525232959.EDBBC3857802@sourceware.org> (raw) https://gcc.gnu.org/g:f630797a1ed2f82faf965a47b43b5f995bc6623a commit r12-1052-gf630797a1ed2f82faf965a47b43b5f995bc6623a Author: Andrew MacLeod <amacleod@redhat.com> Date: Tue May 25 14:55:04 2021 -0400 Adjust fur_source internal api to use gori_compute not ranger_cache. In order to access the dependencies, the FoldUsingRange source API class stored a range_cache.. THis is now contained in the base gori_compute class, so use that now. * gimple-range.cc (fold_using_range::range_of_range_op): Use m_gori intead of m_cache. (fold_using_range::range_of_address): Adjust. (fold_using_range::range_of_phi): Adjust. * gimple-range.h (class fur_source): Adjust. (fur_source::fur_source): Adjust. Diff: --- gcc/gimple-range.cc | 18 +++++++++--------- gcc/gimple-range.h | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc index 593ddb1c3f8..e2d24d6e451 100644 --- a/gcc/gimple-range.cc +++ b/gcc/gimple-range.cc @@ -435,17 +435,17 @@ fold_using_range::range_of_range_op (irange &r, gimple *s, fur_source &src) // Fold range, and register any dependency if available. int_range<2> r2 (type); handler->fold_range (r, type, range1, r2); - if (lhs && src.m_cache) - src.m_cache->register_dependency (lhs, op1); + if (lhs && src.m_gori) + src.m_gori->register_dependency (lhs, op1); } else if (src.get_operand (range2, op2)) { // Fold range, and register any dependency if available. handler->fold_range (r, type, range1, range2); - if (lhs && src.m_cache) + if (lhs && src.m_gori) { - src.m_cache->register_dependency (lhs, op1); - src.m_cache->register_dependency (lhs, op2); + src.m_gori->register_dependency (lhs, op1); + src.m_gori->register_dependency (lhs, op2); } } else @@ -485,8 +485,8 @@ fold_using_range::range_of_address (irange &r, gimple *stmt, fur_source &src) { tree ssa = TREE_OPERAND (base, 0); tree lhs = gimple_get_lhs (stmt); - if (src.m_cache && lhs && gimple_range_ssa_p (ssa)) - src.m_cache->register_dependency (lhs, ssa); + if (src.m_gori && lhs && gimple_range_ssa_p (ssa)) + src.m_gori->register_dependency (lhs, ssa); gcc_checking_assert (irange::supports_type_p (TREE_TYPE (ssa))); src.get_operand (r, ssa); range_cast (r, TREE_TYPE (gimple_assign_rhs1 (stmt))); @@ -563,8 +563,8 @@ fold_using_range::range_of_phi (irange &r, gphi *phi, fur_source &src) edge e = gimple_phi_arg_edge (phi, x); // Register potential dependencies for stale value tracking. - if (src.m_cache && gimple_range_ssa_p (arg)) - src.m_cache->register_dependency (phi_def, arg); + if (src.m_gori && gimple_range_ssa_p (arg)) + src.m_gori->register_dependency (phi_def, arg); // Get the range of the argument on its edge. fur_source e_src (src.m_query, e); diff --git a/gcc/gimple-range.h b/gcc/gimple-range.h index 08035a53238..707dcfe027b 100644 --- a/gcc/gimple-range.h +++ b/gcc/gimple-range.h @@ -84,10 +84,10 @@ class fur_source public: inline fur_source (range_query *q, edge e); inline fur_source (range_query *q, gimple *s); - inline fur_source (range_query *q, class ranger_cache *g, edge e, gimple *s); + inline fur_source (range_query *q, gori_compute *g, edge e, gimple *s); bool get_operand (irange &r, tree expr); protected: - ranger_cache *m_cache; + gori_compute *m_gori; range_query *m_query; edge m_edge; gimple *m_stmt; @@ -124,7 +124,7 @@ inline fur_source::fur_source (range_query *q, edge e) { m_query = q; - m_cache = NULL; + m_gori = NULL; m_edge = e; m_stmt = NULL; } @@ -135,7 +135,7 @@ inline fur_source::fur_source (range_query *q, gimple *s) { m_query = q; - m_cache = NULL; + m_gori = NULL; m_edge = NULL; m_stmt = s; } @@ -144,10 +144,10 @@ fur_source::fur_source (range_query *q, gimple *s) // and can also set the dependency information as appropriate when invoked. inline -fur_source::fur_source (range_query *q, ranger_cache *g, edge e, gimple *s) +fur_source::fur_source (range_query *q, gori_compute *g, edge e, gimple *s) { m_query = q; - m_cache = g; + m_gori = g; m_edge = e; m_stmt = s; }
reply other threads:[~2021-05-25 23:29 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=20210525232959.EDBBC3857802@sourceware.org \ --to=amacleod@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).