re PR tree-optimization/46494 (ICE: verify_flow_info failed when casting-out attribut...
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 14 Feb 2011 17:59:10 +0000 (17:59 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 14 Feb 2011 17:59:10 +0000 (17:59 +0000)
PR tree-optimization/46494
* loop-unroll.c (split_edge_and_insert): Adjust comment.
* loop-init.c (loop_optimizer_finalize): Do not call verify_flow_info.
(pass_rtl_loop_done): Add TODO_verify_flow.
* fwprop.c (pass_rtl_fwprop): Likewise.
* modulo-sched.c (pass_sms): Likewise.
* tree-ssa-dom.c (pass_dominator): Likewise.
* tree-ssa-loop-ch.c (pass_ch): Likewise.
* tree-ssa-loop.c (pass_complete_unrolli): Likewise.
(pass_tree_loop_done): Likewise.
* tree-ssa-pre.c (execute_pre): Likewise.
* tree-ssa-reassoc.c (pass_reassoc): Likewise.
* tree-ssa-sink.c (pass_sink_code): Likewise.
* tree-vrp.c (pass_vrp): Likewise.

From-SVN: r170141

14 files changed:
gcc/ChangeLog
gcc/fwprop.c
gcc/loop-init.c
gcc/loop-unroll.c
gcc/modulo-sched.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr46494.c [new file with mode: 0644]
gcc/tree-ssa-dom.c
gcc/tree-ssa-loop-ch.c
gcc/tree-ssa-loop.c
gcc/tree-ssa-pre.c
gcc/tree-ssa-reassoc.c
gcc/tree-ssa-sink.c
gcc/tree-vrp.c

index 76d333971d69798151afdcd7260c8984b2c080de..c9b7f3544717e4b24657d8f30230e611d8bbce8d 100644 (file)
@@ -1,18 +1,35 @@
+2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR tree-optimization/46494
+       * loop-unroll.c (split_edge_and_insert): Adjust comment.
+       * loop-init.c (loop_optimizer_finalize): Do not call verify_flow_info.
+       (pass_rtl_loop_done): Add TODO_verify_flow.
+       * fwprop.c (pass_rtl_fwprop): Likewise.
+       * modulo-sched.c (pass_sms): Likewise.
+       * tree-ssa-dom.c (pass_dominator): Likewise.
+       * tree-ssa-loop-ch.c (pass_ch): Likewise.
+       * tree-ssa-loop.c (pass_complete_unrolli): Likewise.
+       (pass_tree_loop_done): Likewise.
+       * tree-ssa-pre.c (execute_pre): Likewise.
+       * tree-ssa-reassoc.c (pass_reassoc): Likewise.
+       * tree-ssa-sink.c (pass_sink_code): Likewise.
+       * tree-vrp.c (pass_vrp): Likewise.
+
 2011-02-14  Nathan Froyd  <froydnj@codesourcery.com>
 
-        * config/v850/constraints.md: New file.
-        * config/v850/v850.md: Include it.
-        * config/v850/predicates.md (reg_or_0_operand): Use
-        satisfies_constraint_G.
-        (special_symbolref_operand): Use satisfies_constraint_K.
-        * config/v850/v850.h (CONSTANT_ADDRESS_P): Use constraint_satisfied_p.
-        (GO_IF_LEGITIMATE_ADDRESS): Likewise.
-        (REG_CLASS_FROM_LETTER, INT_7_BITS, INT_8_BITS): Delete.
-        (CONST_OK_FOR_P, CONST_OK_FOR_LETTER_P): Delete.
-        (EXTRA_CONSTRAINT): Delete.
-        (CONST_OK_FOR_I, CONST_OK_FOR_J): Use insn_const_int_ok_for_constraint.
-        (CONST_OK_FOR_K, CONST_OK_FOR_L, CONST_OK_FOR_M): Likewise.
-        (CONST_OK_FOR_N, CONST_OK_FOR_O): Likewise.
+       * config/v850/constraints.md: New file.
+       * config/v850/v850.md: Include it.
+       * config/v850/predicates.md (reg_or_0_operand): Use
+       satisfies_constraint_G.
+       (special_symbolref_operand): Use satisfies_constraint_K.
+       * config/v850/v850.h (CONSTANT_ADDRESS_P): Use constraint_satisfied_p.
+       (GO_IF_LEGITIMATE_ADDRESS): Likewise.
+       (REG_CLASS_FROM_LETTER, INT_7_BITS, INT_8_BITS): Delete.
+       (CONST_OK_FOR_P, CONST_OK_FOR_LETTER_P): Delete.
+       (EXTRA_CONSTRAINT): Delete.
+       (CONST_OK_FOR_I, CONST_OK_FOR_J): Use insn_const_int_ok_for_constraint.
+       (CONST_OK_FOR_K, CONST_OK_FOR_L, CONST_OK_FOR_M): Likewise.
+       (CONST_OK_FOR_N, CONST_OK_FOR_O): Likewise.
 
 2011-02-14  Anatoly Sokolov  <aesok@post.ru>
 
index 704e1431233f9fa592475f5749b8ad8d67c0b108..b2fd9556bbbcf9ea4a3dfb53c0c569953a741df3 100644 (file)
@@ -1471,8 +1471,10 @@ struct rtl_opt_pass pass_rtl_fwprop =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish
+    | TODO_verify_flow
+    | TODO_verify_rtl_sharing
+    | TODO_dump_func                    /* todo_flags_finish */
  }
 };
 
index ce388b6013641169ca24e26230e40e0269121219..bd4af30c5c5d3d32fc849bbe98a01c43754e575f 100644 (file)
@@ -123,14 +123,6 @@ loop_optimizer_finalize (void)
     {
       bb->loop_father = NULL;
     }
-
-  /* Checking.  */
-#ifdef ENABLE_CHECKING
-  /* FIXME: no point to verify flow info after bundling on ia64.  Use this
-     hack for achieving this.  */
-  if (!reload_completed)
-    verify_flow_info ();
-#endif
 }
 
 \f
@@ -235,7 +227,9 @@ struct rtl_opt_pass pass_rtl_loop_done =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_flow
+    | TODO_verify_rtl_sharing
+    | TODO_dump_func                    /* todo_flags_finish */
  }
 };
 
index 67d6ea0cf64deab1ba7d9811d23007691d947b68..6deff4141a36eaafa84616d59bd3eeff7e620c76 100644 (file)
@@ -900,7 +900,7 @@ split_edge_and_insert (edge e, rtx insns)
      CFG.  For this purpose we used to set the BB_SUPERBLOCK flag on BB
      and call break_superblocks when going out of cfglayout mode.  But it
      turns out that this never happens; and that if it does ever happen,
-     the verify_flow_info call in loop_optimizer_finalize would fail.
+     the TODO_verify_flow at the end of the RTL loop passes would fail.
 
      There are two reasons why we expected we could have control flow insns
      in INSNS.  The first is when a comparison has to be done in parts, and
index 9179de504aa7d220849fad0c9280b43932883644..2ae267c81a3887dcdcdeaaf472a89795c50ca95b 100644 (file)
@@ -2897,9 +2897,11 @@ struct rtl_opt_pass pass_sms =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   TODO_dump_func,                       /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
-  TODO_ggc_collect                      /* todo_flags_finish */
+  TODO_df_finish
+    | TODO_verify_flow
+    | TODO_verify_rtl_sharing
+    | TODO_dump_func
+    | TODO_ggc_collect                  /* todo_flags_finish */
  }
 };
 
index be7c57e6da50f1e4608bf86efb8d7601256bc4bd..823ca7d6624b122d1d600c32ce4d7ab7d3774e53 100644 (file)
@@ -1,3 +1,7 @@
+2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.dg/pr46494.c: New test.
+
 2011-02-14  Richard Guenther  <rguenther@suse.de>
 
        * gcc.dg/attr-weak-hidden-1.c: Make definition of foo strong.
diff --git a/gcc/testsuite/gcc.dg/pr46494.c b/gcc/testsuite/gcc.dg/pr46494.c
new file mode 100644 (file)
index 0000000..29f9685
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-do compile }
+/* { dg-options "-O -fno-tree-ccp -fno-tree-fre -ftree-vrp" } */
+
+extern void foo (void) __attribute__((noreturn));
+void g (void)
+{
+  void (*f) (void) = foo;
+  f ();
+}
index bab6ced1c601bbd84d7c7aff8edc426b9c3c1ae2..fc87c4604c730473f1b518fb5a0c2b873bf91333 100644 (file)
@@ -799,10 +799,11 @@ struct gimple_opt_pass pass_dominator =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_dump_func
+  TODO_cleanup_cfg
     | TODO_update_ssa
-    | TODO_cleanup_cfg
-    | TODO_verify_ssa                  /* todo_flags_finish */
+    | TODO_verify_ssa
+    | TODO_verify_flow
+    | TODO_dump_func                   /* todo_flags_finish */
  }
 };
 
index 85c6de8aa0762c475293648815e0aa2dd35b0f74..c58cb5f8bba545ac4d713342d7f8b76d2a591f8f 100644 (file)
@@ -276,7 +276,9 @@ struct gimple_opt_pass pass_ch =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_cleanup_cfg | TODO_dump_func
-  | TODO_verify_ssa                    /* todo_flags_finish */
+  TODO_cleanup_cfg
+    | TODO_verify_ssa
+    | TODO_verify_flow
+    | TODO_dump_func                   /* todo_flags_finish */
  }
 };
index 43693eaeae77cff0b8b44dd5a260f29b2e2a5b33..a1edb51c13d378d91ec9ba0ca2dc259e2b7e5a15 100644 (file)
@@ -528,7 +528,8 @@ struct gimple_opt_pass pass_complete_unrolli =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_dump_func
+  TODO_verify_flow
+    | TODO_dump_func
     | TODO_ggc_collect                         /* todo_flags_finish */
  }
 };
@@ -670,6 +671,8 @@ struct gimple_opt_pass pass_tree_loop_done =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_cleanup_cfg | TODO_dump_func    /* todo_flags_finish */
+  TODO_cleanup_cfg
+    | TODO_verify_flow
+    | TODO_dump_func                   /* todo_flags_finish */
  }
 };
index 00ff8cc1ab5e64d3e77014c216dffa827ead9924..3056723e2ec07ce6a4ed29698f96b6bc8fae824d 100644 (file)
@@ -4909,7 +4909,10 @@ execute_pre (bool do_fre)
   clear_expression_ids ();
   free_scc_vn ();
   if (!do_fre)
-    remove_dead_inserted_code ();
+    {
+      remove_dead_inserted_code ();
+      todo |= TODO_verify_flow;
+    }
 
   scev_finalize ();
   fini_pre (do_fre);
index 197591e330f919f5936d0618d2a1af7458f2e56b..904fef804475e102b4c8453676d955f529838148 100644 (file)
@@ -2282,7 +2282,10 @@ struct gimple_opt_pass pass_reassoc =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_dump_func | TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
+  TODO_verify_ssa
+    | TODO_verify_flow
+    | TODO_dump_func
+    | TODO_ggc_collect                 /* todo_flags_finish */
  }
 };
 
index bfa1a3108a71181bd31629fe67c184c6dba521a9..962c2955e26eada93684b8852004723553a3e87f 100644 (file)
@@ -604,8 +604,9 @@ struct gimple_opt_pass pass_sink_code =
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
   TODO_update_ssa
+    | TODO_verify_ssa
+    | TODO_verify_flow
     | TODO_dump_func
-    | TODO_ggc_collect
-    | TODO_verify_ssa                  /* todo_flags_finish */
+    | TODO_ggc_collect                 /* todo_flags_finish */
  }
 };
index 5e891f5146282cee75dee2aefe02ce57714c0638..65d249f9ae2f930d8f7865ae5b07da604ca88c54 100644 (file)
@@ -7766,9 +7766,10 @@ struct gimple_opt_pass pass_vrp =
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
   TODO_cleanup_cfg
-    | TODO_ggc_collect
+    | TODO_update_ssa
     | TODO_verify_ssa
+    | TODO_verify_flow
     | TODO_dump_func
-    | TODO_update_ssa                  /* todo_flags_finish */
+    | TODO_ggc_collect                 /* todo_flags_finish */
  }
 };