diff options
author | Xiong Hu Luo <luoxhu@linux.ibm.com> | 2019-11-15 08:15:37 +0000 |
---|---|---|
committer | Xiong Hu Luo <luoxhu@gcc.gnu.org> | 2019-11-15 08:15:37 +0000 |
commit | 2aae99f7a4ff1adb7b7b557eb98eccce83a437dc (patch) | |
tree | fae549dc3c967bcf1d02d5fab073fe09335f3710 /gcc | |
parent | f543bdd3f997a82627fee4bd3704dd939ece809d (diff) | |
download | gcc-2aae99f7a4ff1adb7b7b557eb98eccce83a437dc.zip gcc-2aae99f7a4ff1adb7b7b557eb98eccce83a437dc.tar.gz gcc-2aae99f7a4ff1adb7b7b557eb98eccce83a437dc.tar.bz2 |
Update iterator of next
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ipa-inline.c | 15 |
2 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a811edb..cd8e656 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index b5e0096..85521ed 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -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 |