summaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-08-30 12:38:55 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2008-08-30 10:38:55 +0000
commit8bcf15f6ea0bcd8eca70bc83f5390a7bf464c223 (patch)
treebd32e842f1dc6dd55db511672ed8034ae7e0f1f4 /gcc/predict.c
parent76718c16d01e0ad14bb682f479f19702d093800d (diff)
downloadgcc-8bcf15f6ea0bcd8eca70bc83f5390a7bf464c223.tar.gz
parse.c (parse_interface): Silence uninitialized var warning.
* parse.c (parse_interface): Silence uninitialized var warning. * postreload-gcse.c (gate_handle_gcse2): Disable for functions optimized for speed. * final.c (compute_alignments): Use optimize_bb_for_size_p. * tree-call-cdce.c (gate_call_cdce): Use optimize_function_for_speed_p. * opts.c (flag_predictive_commoning_set, flag_unswitch_loops_set, flag_gcse_after_reload_set): New static vars. (common_handle_option): Enable those flags for profile-use. (decode_options): Remove optimize_size flags that are handled on higher granuality. * tree-vectorizer.c (vectorize_loops): Use optimize_loop_nest_for_speed_p. * tree-ssa-pre.c (do_pre): Use optimize_function_for_speed_p. * tree-predcom.c (tree_predictive_commoning): Use optimize_loop_for_speed_p. * varasm.c (assemble_start_function): Use optimize_function_for_speed_p. * bb-reorder.c (rest_of_handle_reorder_blocks): Likewise. * predict.c (optimize_loop_for_speed_p): Fix walk. From-SVN: r139801
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index 4e17b9ac676..d5de938ccfa 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -300,7 +300,12 @@ optimize_loop_nest_for_speed_p (struct loop *loop)
else if (l->next)
l = l->next;
else
- l = loop_outer (l);
+ {
+ while (l != loop && !l->next)
+ l = loop_outer (l);
+ if (l != loop)
+ l = l->next;
+ }
}
return false;
}