OSDN Git Service

* ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c,
[pf3gnuchains/gcc-fork.git] / gcc / ipa-type-escape.c
index b6744a6..0807d0b 100644 (file)
@@ -1,4 +1,4 @@
-/* Escape analysis for types.
+/* Type based alias analysis.
    Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010
    Free Software Foundation, Inc.
    Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
    Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010
    Free Software Foundation, Inc.
    Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
@@ -53,7 +53,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "timevar.h"
 #include "diagnostic.h"
 #include "flags.h"
 #include "timevar.h"
 #include "diagnostic.h"
-#include "tree-pretty-print.h"
 #include "langhooks.h"
 
 /* Some of the aliasing is called very early, before this phase is
 #include "langhooks.h"
 
 /* Some of the aliasing is called very early, before this phase is
@@ -2113,7 +2112,9 @@ type_escape_execute (void)
 static bool
 gate_type_escape_vars (void)
 {
 static bool
 gate_type_escape_vars (void)
 {
-  return flag_ipa_struct_reorg && flag_whole_program && (optimize > 0);
+  return (flag_ipa_type_escape
+         /* Don't bother doing anything if the program has errors.  */
+         && !(errorcount || sorrycount));
 }
 
 struct simple_ipa_opt_pass pass_ipa_type_escape =
 }
 
 struct simple_ipa_opt_pass pass_ipa_type_escape =