public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][PUSHED] Remove unused function.
@ 2021-11-12 11:39 Martin Liška
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liška @ 2021-11-12 11:39 UTC (permalink / raw)
  To: gcc-patches

This one is last unused function we have, I'm going to push
this as obvious. Martin, feel free to restore the function once
it's used.

Thanks,
Martin

	PR tree-optimization/102497

gcc/ChangeLog:

	* gimple-predicate-analysis.cc (add_pred): Remove unused
	function:
---
  gcc/gimple-predicate-analysis.cc | 61 --------------------------------
  1 file changed, 61 deletions(-)

diff --git a/gcc/gimple-predicate-analysis.cc b/gcc/gimple-predicate-analysis.cc
index 454113d532e..6dde0203841 100644
--- a/gcc/gimple-predicate-analysis.cc
+++ b/gcc/gimple-predicate-analysis.cc
@@ -2105,67 +2105,6 @@ predicate::normalize (gimple *use_or_def, bool is_use)
      }
  }
  
-/* Add a predicate for the condition or logical assignment STMT to CHAIN.
-   Expand SSA_NAME into constituent subexpressions.  Invert the result
-   if INVERT is true.  Return true if the predicate has been added.  */
-
-static bool
-add_pred (pred_chain *chain, gimple *stmt, bool invert)
-{
-  if (gimple_code (stmt) == GIMPLE_COND)
-    {
-      tree lhs = gimple_cond_lhs (stmt);
-      if (TREE_CODE (lhs) == SSA_NAME)
-	{
-	  gimple *def = SSA_NAME_DEF_STMT (lhs);
-	  if (is_gimple_assign (def)
-	      && add_pred (chain, def, invert))
-	    return true;
-	}
-
-      pred_info pred;
-      pred.pred_lhs = lhs;
-      pred.pred_rhs = gimple_cond_rhs (stmt);
-      pred.cond_code = gimple_cond_code (stmt);
-      pred.invert = invert;
-      chain->safe_push (pred);
-      return true;
-    }
-
-  if (!is_gimple_assign (stmt))
-    return false;
-
-  if (gimple_assign_single_p (stmt))
-    // FIXME: handle this?
-    return false;
-
-  if (TREE_TYPE (gimple_assign_lhs (stmt)) != boolean_type_node)
-    return false;
-
-  tree rhs1 = gimple_assign_rhs1 (stmt);
-  tree rhs2 = gimple_assign_rhs2 (stmt);
-  tree_code code = gimple_assign_rhs_code (stmt);
-  if (code == BIT_AND_EXPR)
-    {
-      if (TREE_CODE (rhs1) == SSA_NAME
-	  && add_pred (chain, SSA_NAME_DEF_STMT (rhs1), invert)
-	  && TREE_CODE (rhs2) == SSA_NAME
-	  /* FIXME: Need to handle failure below! */
-	  && add_pred (chain, SSA_NAME_DEF_STMT (rhs2), invert))
-	return true;
-    }
-  else if (TREE_CODE_CLASS (code) != tcc_comparison)
-    return false;
-
-  pred_info pred;
-  pred.pred_lhs = rhs1;
-  pred.pred_rhs = rhs2;
-  pred.cond_code = code;
-  pred.invert = invert;
-  chain->safe_push (pred);
-  return true;
-}
-
  /* Convert the chains of control dependence edges into a set of predicates.
     A control dependence chain is represented by a vector edges.  DEP_CHAINS
     points to an array of NUM_CHAINS dependence chains. One edge in
-- 
2.33.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH (pushed)] remove unused function
@ 2022-08-31 12:34 Martin Liška
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liška @ 2022-08-31 12:34 UTC (permalink / raw)
  To: gcc-patches

	PR tree-optimization/106789

gcc/ChangeLog:

	* range-op-float.cc (default_frelop_fold_range): Remove the
	  function.
---
 gcc/range-op-float.cc | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc
index d859309f863..c30f2af391c 100644
--- a/gcc/range-op-float.cc
+++ b/gcc/range-op-float.cc
@@ -232,22 +232,6 @@ frange_drop_ninf (frange &r, tree type)
   r.intersect (tmp);
 }
 
-// Default implementation of fold_range for relational operators.
-// This amounts to passing on any known relations from the oracle, iff
-// we know the operands are not NAN or -ffinite-math-only holds.
-
-static inline bool
-default_frelop_fold_range (irange &r, tree type,
-			  const frange &op1, const frange &op2,
-			  relation_kind rel, relation_kind my_rel)
-{
-  if (frelop_early_resolve (r, type, op1, op2, rel, my_rel))
-    return true;
-
-  r.set_varying (type);
-  return true;
-}
-
 // (X <= VAL) produces the range of [MIN, VAL].
 
 static void
-- 
2.37.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-31 12:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 11:39 [PATCH][PUSHED] Remove unused function Martin Liška
2022-08-31 12:34 [PATCH (pushed)] remove " Martin Liška

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