Update iterator of next
authorXiong Hu Luo <luoxhu@linux.ibm.com>
Fri, 15 Nov 2019 08:15:37 +0000 (08:15 +0000)
committerXiong Hu Luo <luoxhu@gcc.gnu.org>
Fri, 15 Nov 2019 08:15:37 +0000 (08:15 +0000)
next is initialized only in the loop before, it is never updated
in it's own loop.

gcc/ChangeLog:

2019-11-15  Xiong Hu Luo  <luoxhu@linux.ibm.com>

* ipa-inline.c (inline_small_functions): Update iterator of next.

From-SVN: r278277

gcc/ChangeLog
gcc/ipa-inline.c

index a811edbcc566875c3952d143c493b8c720dbdb04..cd8e656540b083c623afb54705b749cff05cd03c 100644 (file)
@@ -1,3 +1,7 @@
+2019-11-15  Xiong Hu Luo  <luoxhu@linux.ibm.com>
+
+       * ipa-inline.c (inline_small_functions): Update iterator of next.
+
 2019-11-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
        * lra-spills.c (assign_spill_hard_regs): Check that the spill
index b5e009696b7769acdbfbe52eaa031a81dc9347aa..85521ed2888700a8c5ceba28d5965e8ba8ac8e7b 100644 (file)
@@ -1931,12 +1931,15 @@ inline_small_functions (void)
        }
       if (has_speculative)
        for (edge = node->callees; edge; edge = next)
-         if (edge->speculative && !speculation_useful_p (edge,
-                                                         edge->aux != NULL))
-           {
-             edge->resolve_speculation ();
-             update = true;
-           }
+         {
+           if (edge->speculative
+               && !speculation_useful_p (edge, edge->aux != NULL))
+             {
+               edge->resolve_speculation ();
+               update = true;
+             }
+           next = edge->next_callee;
+         }
       if (update)
        {
          struct cgraph_node *where = node->inlined_to