From ae382ebd8cbd04ae9d6bd24507b307f00d7ff5b4 Mon Sep 17 00:00:00 2001 From: Po-Chun Chang Date: Mon, 22 Jul 2013 09:20:11 -0600 Subject: [PATCH] df-problems.c (can_move_insns_across): Exit loop once we find a non-fixed, non-global register. * df-problems.c (can_move_insns_across): Exit loop once we find a non-fixed, non-global register. * ipa-pure-const.c (propagate_nothrow): Exit loop after setting can_throw. * omega.c (omega_eliminate_red): Break after setting red_found. (omega_problem_has_red_equations): Similarly after setting found. (omega_query_variable): Similarly after setting coupled. * trans-decl.c (gfc_build_dummy_array_decl): Exit loop after setting PACKED_PARTIAL. From-SVN: r201132 --- gcc/ChangeLog | 12 ++++++++++++ gcc/df-problems.c | 5 ++++- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/trans-decl.c | 5 ++++- gcc/ipa-pure-const.c | 5 ++++- gcc/omega.c | 20 ++++++++++++++++---- 6 files changed, 45 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 315beb5dff1..5f3b8ae527c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2013-07-22 Chang + + * df-problems.c (can_move_insns_across): Exit loop once we + find a non-fixed, non-global register. + + * ipa-pure-const.c (propagate_nothrow): Exit loop after + setting can_throw. + + * omega.c (omega_eliminate_red): Break after setting red_found. + (omega_problem_has_red_equations): Similarly after setting found. + (omega_query_variable): Similarly after setting coupled. + 2013-07-22 Marek Polacek * gimplify.c: Don't include gimple.h twice. diff --git a/gcc/df-problems.c b/gcc/df-problems.c index dad0ae7cd88..e647b5ad0a0 100644 --- a/gcc/df-problems.c +++ b/gcc/df-problems.c @@ -4040,7 +4040,10 @@ can_move_insns_across (rtx from, rtx to, rtx across_from, rtx across_to, if (i < FIRST_PSEUDO_REGISTER && ! fixed_regs[i] && ! global_regs[i]) - fail = 1; + { + fail = 1; + break; + } } } diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 412e963206f..4ea5d2ee99d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2013-07-22 Chang + + * trans-decl.c (gfc_build_dummy_array_decl): Exit loop after + setting PACKED_PARTIAL. + 2013-07-22 Tobias Burnus * trans-array.c (gfc_array_allocate): Correct memory-leak patch. diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 0d7d9c577c1..2916b4cc52e 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -975,7 +975,10 @@ gfc_build_dummy_array_decl (gfc_symbol * sym, tree dummy) && as->lower[n] && as->upper[n]->expr_type == EXPR_CONSTANT && as->lower[n]->expr_type == EXPR_CONSTANT)) - packed = PACKED_PARTIAL; + { + packed = PACKED_PARTIAL; + break; + } } } else diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 5492349b4e1..b00ae2374a3 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -1431,7 +1431,10 @@ propagate_nothrow (void) } for (ie = node->indirect_calls; ie; ie = ie->next_callee) if (ie->can_throw_external) - can_throw = true; + { + can_throw = true; + break; + } w_info = (struct ipa_dfs_info *) w->symbol.aux; w = w_info->next_cycle; } diff --git a/gcc/omega.c b/gcc/omega.c index 8829a71a91d..2443ecb0307 100644 --- a/gcc/omega.c +++ b/gcc/omega.c @@ -2591,7 +2591,10 @@ omega_eliminate_red (omega_pb pb, bool eliminate_all) for (red_found = 0, e = pb->num_geqs - 1; e >= 0; e--) if (pb->geqs[e].color == omega_red) - red_found = 1; + { + red_found = 1; + break; + } if (!red_found) { @@ -4853,7 +4856,10 @@ omega_problem_has_red_equations (omega_pb pb) for (e = pb->num_geqs - 1; e >= 0; e--) if (pb->geqs[e].color == omega_red) - result = true; + { + result = true; + break; + } if (!result) return false; @@ -4906,7 +4912,10 @@ omega_problem_has_red_equations (omega_pb pb) for (e = pb->num_geqs - 1; e >= 0; e--) if (pb->geqs[e].color == omega_red) - result = true; + { + result = true; + break; + } if (dump_file && (dump_flags & TDF_DETAILS)) { @@ -5251,7 +5260,10 @@ omega_query_variable (omega_pb pb, int i, int *lower_bound, int *upper_bound) for (e = pb->num_subs - 1; e >= 0; e--) if (pb->subs[e].coef[i] != 0) - coupled = true; + { + coupled = true; + break; + } for (e = pb->num_eqs - 1; e >= 0; e--) if (pb->eqs[e].coef[i] != 0)