diff options
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r-- | gcc/ipa-pure-const.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index b9a3d3e..a074a11 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -1138,7 +1138,7 @@ propagate_pure_const (void) struct cgraph_edge *e; struct cgraph_edge *ie; int i; - struct ipa_ref *ref; + struct ipa_ref *ref = NULL; funct_state w_l = get_function_state (w); if (dump_file && (dump_flags & TDF_DETAILS)) @@ -1263,7 +1263,7 @@ propagate_pure_const (void) break; /* And finally all loads and stores. */ - for (i = 0; ipa_ref_list_reference_iterate (&w->ref_list, i, ref); i++) + for (i = 0; w->iterate_reference (i, ref); i++) { enum pure_const_state_e ref_state = IPA_CONST; bool ref_looping = false; @@ -1271,14 +1271,14 @@ propagate_pure_const (void) { case IPA_REF_LOAD: /* readonly reads are safe. */ - if (TREE_READONLY (ipa_ref_varpool_node (ref)->decl)) + if (TREE_READONLY (ref->referred->decl)) break; if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " nonreadonly global var read\n"); ref_state = IPA_PURE; break; case IPA_REF_STORE: - if (ipa_ref_cannot_lead_to_return (ref)) + if (ref->cannot_lead_to_return ()) break; ref_state = IPA_NEITHER; if (dump_file && (dump_flags & TDF_DETAILS)) |