From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1011) id F3C103857C75; Fri, 16 Apr 2021 13:25:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F3C103857C75 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Andrew Macleod To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aldyh/heads/ranger-relational)] Remove the range/conditional part of gori iterator. unused. unneeded. X-Act-Checkin: gcc X-Git-Author: Andrew MacLeod X-Git-Refname: refs/users/aldyh/heads/ranger-relational X-Git-Oldrev: 2a6b896e652010ecc3667eb2f0979efa2ba30f95 X-Git-Newrev: f3169872e9c698b0271e245feca2cb522c77a12d Message-Id: <20210416132531.F3C103857C75@sourceware.org> Date: Fri, 16 Apr 2021 13:25:31 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 13:25:32 -0000 https://gcc.gnu.org/g:f3169872e9c698b0271e245feca2cb522c77a12d commit f3169872e9c698b0271e245feca2cb522c77a12d Author: Andrew MacLeod Date: Thu Apr 15 17:30:54 2021 -0400 Remove the range/conditional part of gori iterator. unused. unneeded. Diff: --- gcc/gimple-range-gori.cc | 82 ------------------------------------------------ gcc/gimple-range-gori.h | 21 ------------- 2 files changed, 103 deletions(-) diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc index d9dc142d392..545f0a16059 100644 --- a/gcc/gimple-range-gori.cc +++ b/gcc/gimple-range-gori.cc @@ -1479,85 +1479,3 @@ gori_export_iterator::get_name () } return NULL_TREE; } - - -// Fetch the name and range of the next export which actually has a non-varying -// outgoing range calculation on edge E. - -tree -gori_export_iterator::get_range (gori_compute &gori, edge e, irange &r) -{ - while (bmp_iter_set (&bi, &y)) - { - tree name = ssa_name (y); - if (name && gori.outgoing_edge_range_p (r, e, name)) - return name; - next (); - } - return NULL_TREE; -} - - -// Instantiate a "resolved condition" iterator over edge E. -// Utilize a basic iterator once the intial condition is resolved. - -gori_cond_iterator::gori_cond_iterator (gori_compute &gori, edge e) - : gori_export_iterator (gori.exports (e->src)) -{ - // Initialze initial state to nothing. - m_stmt = NULL; - if (!bm) - return; - - // Check first for a condition on the stmt.. ie if (a_3 > b_6) - // as this will have no LHS with a condition register. - gimple *s = gimple_outgoing_range_stmt_p (e->src); - if (s && is_a (s) - && gimple_range_ssa_p (gimple_cond_rhs (s)) - && gimple_range_ssa_p (gimple_cond_lhs (s))) - { - // This will be the only stmt if the arguments aren't boolean. - // No point in iterating over the other names. - if (TREE_CODE (TREE_TYPE (gimple_cond_lhs (s))) != BOOLEAN_TYPE) - bm = NULL; - m_stmt = s; - } -} - - -// Return any stmt which the LHS is a boolean which resolved to either -// TRUE or FALSE on edge E. Return the range in R. - -gimple * -gori_cond_iterator::get_stmt (gori_compute &gori, edge e, irange &r) -{ - tree name; - // If there is an initial stmt set up, proicess it first. - if (m_stmt) - { - // Set the LHS range from the edge. - if (e->flags & EDGE_TRUE_VALUE) - r = int_range<2> (boolean_true_node, boolean_true_node); - else - r = int_range<2> (boolean_false_node, boolean_false_node); - // Clear the initial state now. - gimple *tmp = m_stmt; - m_stmt = NULL; - return tmp; - } - - // Continue with basic iteration over exports with existing ranges, - // and return only the ones which are boolean and resolve to a constant. - for ( ; bm && (name = get_range (gori, e, r)); next ()) - { - if (name && TREE_CODE (TREE_TYPE (name)) == BOOLEAN_TYPE - && r.singleton_p ()) - { - gimple *stmt = SSA_NAME_DEF_STMT (name); - // Ignore default defs and such, just actual defining stmts. - if (gimple_get_lhs (stmt) == name) - return stmt; - } - } - return NULL; -} diff --git a/gcc/gimple-range-gori.h b/gcc/gimple-range-gori.h index ba7f5139401..83f8806f9fd 100644 --- a/gcc/gimple-range-gori.h +++ b/gcc/gimple-range-gori.h @@ -224,18 +224,6 @@ private: ((name) = iter.get_name ()); \ iter.next ()) -// For each name exported on edge e that calculates a range. -#define FOR_EACH_GORI_EXPORT_RANGE(gori, e, name, r) \ - for (gori_export_iterator iter ((gori).exports ((e)->src)); \ - ((name) = iter.get_range ((gori), (e), (r))); \ - iter.next ()) - -// For each stmt that resolves to a TRUE or FALSE result on an edge. -#define FOR_EACH_GORI_EXPORT_COND(gori, e, stmt, r) \ - for (gori_cond_iterator iter ((gori), (e)); \ - ((stmt) = iter.get_stmt ((gori), (e), (r))); \ - iter.next ()) - // Used to assist with iterating over the GORI export list in various ways class gori_export_iterator { public: @@ -249,13 +237,4 @@ protected: unsigned y; }; -class gori_cond_iterator : public gori_export_iterator -{ -public: - gori_cond_iterator (gori_compute &gori, edge e); - gimple *get_stmt (gori_compute &gori, edge e, irange &r); -protected: - gimple *m_stmt; -}; - #endif // GCC_GIMPLE_RANGE_GORI_H