summaryrefslogtreecommitdiff
path: root/gcc/tree-optimize.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-optimize.c')
-rw-r--r--gcc/tree-optimize.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index 76918f1cfd6..ed4676996dd 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -1,5 +1,5 @@
/* Top-level control of tree optimizations.
- Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+ Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Diego Novillo <dnovillo@redhat.com>
@@ -57,7 +57,7 @@ gate_all_optimizations (void)
return (optimize >= 1
/* Don't bother doing anything if the program has errors.
We have to pass down the queue if we already went into SSA */
- && (!(errorcount || sorrycount) || gimple_in_ssa_p (cfun)));
+ && (!seen_error () || gimple_in_ssa_p (cfun)));
}
struct gimple_opt_pass pass_all_optimizations =
@@ -85,7 +85,7 @@ static bool
gate_all_early_local_passes (void)
{
/* Don't bother doing anything if the program has errors. */
- return (!errorcount && !sorrycount && !in_lto_p);
+ return (!seen_error () && !in_lto_p);
}
struct simple_ipa_opt_pass pass_early_local_passes =
@@ -126,7 +126,7 @@ gate_all_early_optimizations (void)
{
return (optimize >= 1
/* Don't bother doing anything if the program has errors. */
- && !(errorcount || sorrycount));
+ && !seen_error ());
}
struct gimple_opt_pass pass_all_early_optimizations =