aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.h
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2022-09-01 16:44:29 +0200
committerAldy Hernandez <aldyh@redhat.com>2022-09-01 20:06:19 +0200
commitbb17c5030dc47c69c700e0fd0145285dc8f913a2 (patch)
treed36060d77ddeaeca09c5c539b313ecdfade64959 /gcc/value-range.h
parent5924b6b2e75afa95f09f75ad3ef9ccbeac65d55d (diff)
downloadgcc-bb17c5030dc47c69c700e0fd0145285dc8f913a2.zip
gcc-bb17c5030dc47c69c700e0fd0145285dc8f913a2.tar.gz
gcc-bb17c5030dc47c69c700e0fd0145285dc8f913a2.tar.bz2
Convert ranger uses of real_inf to dconst[n]inf.
gcc/ChangeLog: * range-op-float.cc (build_le): Convert to dconst*inf. (build_ge): Same. * value-range.cc (frange::set_signbit): Same. (frange::normalize_kind): Same. (range_tests_floats): Same. * value-range.h (vrp_val_max): Same. (vrp_val_min): Same. (frange::set_varying): Same.
Diffstat (limited to 'gcc/value-range.h')
-rw-r--r--gcc/value-range.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/gcc/value-range.h b/gcc/value-range.h
index 3767bd1..bc00f3d 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -1050,11 +1050,7 @@ vrp_val_max (const_tree type)
return wide_int_to_tree (const_cast<tree> (type), max);
}
if (frange::supports_p (type))
- {
- REAL_VALUE_TYPE real;
- real_inf (&real);
- return build_real (const_cast <tree> (type), real);
- }
+ return build_real (const_cast <tree> (type), dconstinf);
return NULL_TREE;
}
@@ -1068,11 +1064,7 @@ vrp_val_min (const_tree type)
if (POINTER_TYPE_P (type))
return build_zero_cst (const_cast<tree> (type));
if (frange::supports_p (type))
- {
- REAL_VALUE_TYPE ninf;
- real_inf (&ninf, 1);
- return build_real (const_cast <tree> (type), ninf);
- }
+ return build_real (const_cast <tree> (type), dconstninf);
return NULL_TREE;
}
@@ -1145,8 +1137,8 @@ frange::set_varying (tree type)
{
m_kind = VR_VARYING;
m_type = type;
- real_inf (&m_min, 1);
- real_inf (&m_max, 0);
+ m_min = dconstninf;
+ m_max = dconstinf;
m_props.set_varying ();
}