public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aldyh/heads/ranger-relational)] Remove the range/conditional part of gori iterator. unused. unneeded.
@ 2021-04-16 13:25 Andrew Macleod
  0 siblings, 0 replies; only message in thread
From: Andrew Macleod @ 2021-04-16 13:25 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f3169872e9c698b0271e245feca2cb522c77a12d

commit f3169872e9c698b0271e245feca2cb522c77a12d
Author: Andrew MacLeod <amacleod@redhat.com>
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<gcond *> (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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-16 13:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 13:25 [gcc(refs/users/aldyh/heads/ranger-relational)] Remove the range/conditional part of gori iterator. unused. unneeded Andrew Macleod

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).