public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-250] Remove range_fold_{unary,binary}_expr.
@ 2023-04-26 8:36 Aldy Hernandez
0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2023-04-26 8:36 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:bfd9415761dabcfa3ddef2c78c169ac82702cd00
commit r14-250-gbfd9415761dabcfa3ddef2c78c169ac82702cd00
Author: Aldy Hernandez <aldyh@redhat.com>
Date: Mon Nov 21 01:06:58 2022 +0100
Remove range_fold_{unary,binary}_expr.
gcc/ChangeLog:
* tree-vrp.cc (supported_types_p): Remove.
(defined_ranges_p): Remove.
(range_fold_binary_expr): Remove.
(range_fold_unary_expr): Remove.
* tree-vrp.h (range_fold_unary_expr): Remove.
(range_fold_binary_expr): Remove.
Diff:
---
gcc/tree-vrp.cc | 86 ---------------------------------------------------------
gcc/tree-vrp.h | 5 ----
2 files changed, 91 deletions(-)
diff --git a/gcc/tree-vrp.cc b/gcc/tree-vrp.cc
index 9b870640e23..27126088708 100644
--- a/gcc/tree-vrp.cc
+++ b/gcc/tree-vrp.cc
@@ -587,92 +587,6 @@ compare_values (tree val1, tree val2)
return compare_values_warnv (val1, val2, &sop);
}
-/* If the types passed are supported, return TRUE, otherwise set VR to
- VARYING and return FALSE. */
-
-static bool
-supported_types_p (value_range *vr,
- tree type0,
- tree = NULL)
-{
- if (!value_range::supports_p (type0))
- {
- vr->set_varying (type0);
- return false;
- }
- return true;
-}
-
-/* If any of the ranges passed are defined, return TRUE, otherwise set
- VR to UNDEFINED and return FALSE. */
-
-static bool
-defined_ranges_p (value_range *vr,
- const value_range *vr0, const value_range *vr1 = NULL)
-{
- if (vr0->undefined_p () && (!vr1 || vr1->undefined_p ()))
- {
- vr->set_undefined ();
- return false;
- }
- return true;
-}
-
-/* Perform a binary operation on a pair of ranges. */
-
-void
-range_fold_binary_expr (value_range *vr,
- enum tree_code code,
- tree expr_type,
- const value_range *vr0_,
- const value_range *vr1_)
-{
- if (!supported_types_p (vr, expr_type)
- || !defined_ranges_p (vr, vr0_, vr1_))
- return;
- range_op_handler op (code, expr_type);
- if (!op)
- {
- vr->set_varying (expr_type);
- return;
- }
-
- value_range vr0 (*vr0_);
- value_range vr1 (*vr1_);
- if (vr0.undefined_p ())
- vr0.set_varying (expr_type);
- if (vr1.undefined_p ())
- vr1.set_varying (expr_type);
- vr0.normalize_addresses ();
- vr1.normalize_addresses ();
- if (!op.fold_range (*vr, expr_type, vr0, vr1))
- vr->set_varying (expr_type);
-}
-
-/* Perform a unary operation on a range. */
-
-void
-range_fold_unary_expr (value_range *vr,
- enum tree_code code, tree expr_type,
- const value_range *vr0,
- tree vr0_type)
-{
- if (!supported_types_p (vr, expr_type, vr0_type)
- || !defined_ranges_p (vr, vr0))
- return;
- range_op_handler op (code, expr_type);
- if (!op)
- {
- vr->set_varying (expr_type);
- return;
- }
-
- value_range vr0_cst (*vr0);
- vr0_cst.normalize_addresses ();
- if (!op.fold_range (*vr, expr_type, vr0_cst, value_range (expr_type)))
- vr->set_varying (expr_type);
-}
-
/* Helper for overflow_comparison_p
OP0 CODE OP1 is a comparison. Examine the comparison and potentially
diff --git a/gcc/tree-vrp.h b/gcc/tree-vrp.h
index 3b1d6dc971e..bad50e31aad 100644
--- a/gcc/tree-vrp.h
+++ b/gcc/tree-vrp.h
@@ -28,11 +28,6 @@ extern int compare_values (tree, tree);
extern int compare_values_warnv (tree, tree, bool *);
extern int operand_less_p (tree, tree);
-void range_fold_unary_expr (value_range *, enum tree_code, tree type,
- const value_range *, tree op0_type);
-void range_fold_binary_expr (value_range *, enum tree_code, tree type,
- const value_range *, const value_range *);
-
extern enum value_range_kind intersect_range_with_nonzero_bits
(enum value_range_kind, wide_int *, wide_int *, const wide_int &, signop);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-26 8:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-26 8:36 [gcc r14-250] Remove range_fold_{unary,binary}_expr Aldy Hernandez
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).