Make ipa-pure-const more strict about summary constrains.
authorMartin Liska <mliska@suse.cz>
Fri, 8 Jun 2018 12:37:49 +0000 (14:37 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 8 Jun 2018 12:37:49 +0000 (12:37 +0000)
2018-06-08  Martin Liska  <mliska@suse.cz>

* ipa-pure-const.c (propagate_pure_const): Use ::get at places
        where we expect an existing summary.

From-SVN: r261322

gcc/ChangeLog
gcc/ipa-pure-const.c

index 38ffb41..1023131 100644 (file)
@@ -1,5 +1,10 @@
 2018-06-08  Martin Liska  <mliska@suse.cz>
 
+       * ipa-pure-const.c (propagate_pure_const): Use ::get at places
+        where we expect an existing summary.
+
+2018-06-08  Martin Liska  <mliska@suse.cz>
+
        * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
        * ipa-inline.h (estimate_edge_growth): Likewise.
 
index 2cf8c2f..9441d25 100644 (file)
@@ -1477,7 +1477,7 @@ propagate_pure_const (void)
                }
              if (avail > AVAIL_INTERPOSABLE)
                {
-                 funct_state y_l = funct_state_summaries->get_create (y);
+                 funct_state y_l = funct_state_summaries->get (y);
                  if (dump_file && (dump_flags & TDF_DETAILS))
                    {
                      fprintf (dump_file,
@@ -1591,7 +1591,7 @@ propagate_pure_const (void)
       while (w && !can_free)
        {
          struct cgraph_edge *e;
-         funct_state w_l = funct_state_summaries->get_create (w);
+         funct_state w_l = funct_state_summaries->get (w);
 
          if (w_l->can_free
              || w->get_availability () == AVAIL_INTERPOSABLE
@@ -1606,7 +1606,7 @@ propagate_pure_const (void)
                                                                  e->caller);
 
              if (avail > AVAIL_INTERPOSABLE)
-               can_free = funct_state_summaries->get_create (y)->can_free;
+               can_free = funct_state_summaries->get (y)->can_free;
              else
                can_free = true;
            }
@@ -1619,7 +1619,7 @@ propagate_pure_const (void)
       w = node;
       while (w)
        {
-         funct_state w_l = funct_state_summaries->get_create (w);
+         funct_state w_l = funct_state_summaries->get (w);
          enum pure_const_state_e this_state = pure_const_state;
          bool this_looping = looping;