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 38ffb41c649e193b67bdff244998ba551f821281..1023131422807911845aaea3265754b0c1b0b9bd 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 2cf8c2fa32cbc16a7f667ac29e2de76eb2254866..9441d2508ab7a8116bb7ded9e4887cd61894466e 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;