aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/name-lookup.c4
-rw-r--r--gcc/ipa-cp.c4
-rw-r--r--gcc/sreal.h10
-rw-r--r--gcc/tree-ssa-sccvn.c3
6 files changed, 24 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 561f612..36795f4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2016-09-23 Jakub Jelinek <jakub@redhat.com>
+
+ * ipa-cp.c (ipcp_store_vr_results): Avoid static local
+ var zero.
+ * sreal.h (sreal::min, sreal::max): Avoid static local vars,
+ construct values without normalization.
+ * tree-ssa-sccvn.c (vn_reference_lookup_3): Don't initialize
+ static local lhs_ops to vNULL.
+
2016-09-23 Matthew Wahab <matthew.wahab@arm.com>
Jiong Wang <jiong.wang@arm.com>
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ae59343..9f5eba8 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2016-09-23 Jakub Jelinek <jakub@redhat.com>
+ * name-lookup.c (store_bindings, store_class_bindings): Don't
+ initialize static local bindings_need_stored to vNULL.
+
* typeck2.c (process_init_constructor_record): Use
CONSTRUCTOR_NELTS (...) instead of
vec_safe_length (CONSTRUCTOR_ELTS (...)).
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 952d8b7..ce16d57 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -6197,7 +6197,7 @@ store_binding (tree id, vec<cxx_saved_binding, va_gc> **old_bindings)
static void
store_bindings (tree names, vec<cxx_saved_binding, va_gc> **old_bindings)
{
- static vec<tree> bindings_need_stored = vNULL;
+ static vec<tree> bindings_need_stored;
tree t, id;
size_t i;
@@ -6233,7 +6233,7 @@ static void
store_class_bindings (vec<cp_class_binding, va_gc> *names,
vec<cxx_saved_binding, va_gc> **old_bindings)
{
- static vec<tree> bindings_need_stored = vNULL;
+ static vec<tree> bindings_need_stored;
size_t i;
cp_class_binding *cb;
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index cb60f1e..fdcce16 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -5204,11 +5204,9 @@ ipcp_store_vr_results (void)
}
else
{
- static wide_int zero = integer_zero_node;
vr.known = false;
vr.type = VR_VARYING;
- vr.min = zero;
- vr.max = zero;
+ vr.min = vr.max = wi::zero (INT_TYPE_SIZE);
}
ts->m_vr->quick_push (vr);
}
diff --git a/gcc/sreal.h b/gcc/sreal.h
index edf02f1..ce9cdbb 100644
--- a/gcc/sreal.h
+++ b/gcc/sreal.h
@@ -104,14 +104,20 @@ public:
/* Global minimum sreal can hold. */
inline static sreal min ()
{
- static sreal min = sreal (-SREAL_MAX_SIG, SREAL_MAX_EXP);
+ sreal min;
+ /* This never needs normalization. */
+ min.m_sig = -SREAL_MAX_SIG;
+ min.m_exp = SREAL_MAX_EXP;
return min;
}
/* Global minimum sreal can hold. */
inline static sreal max ()
{
- static sreal max = sreal (SREAL_MAX_SIG, SREAL_MAX_EXP);
+ sreal max;
+ /* This never needs normalization. */
+ max.m_sig = SREAL_MAX_SIG;
+ max.m_exp = SREAL_MAX_EXP;
return max;
}
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index bf5e97a..21cc54e 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1786,8 +1786,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_,
gimple *def_stmt = SSA_NAME_DEF_STMT (vuse);
tree base = ao_ref_base (ref);
HOST_WIDE_INT offset, maxsize;
- static vec<vn_reference_op_s>
- lhs_ops = vNULL;
+ static vec<vn_reference_op_s> lhs_ops;
ao_ref lhs_ref;
bool lhs_ref_ok = false;