OSDN Git Service

More improvements to sparc VIS vec_init code generation.
[pf3gnuchains/gcc-fork.git] / gcc / gcse.c
index fd1455f..8adbc38 100644 (file)
@@ -732,7 +732,7 @@ want_to_gcse_p (rtx x, int *max_distance_ptr)
   /* GCSE'ing constants:
 
      We do not specifically distinguish between constant and non-constant
-     expressions in PRE and Hoist.  We use rtx_cost below to limit
+     expressions in PRE and Hoist.  We use set_src_cost below to limit
      the maximum distance simple expressions can travel.
 
      Nevertheless, constants are much easier to GCSE, and, hence,
@@ -773,7 +773,7 @@ want_to_gcse_p (rtx x, int *max_distance_ptr)
 
          gcc_assert (!optimize_function_for_speed_p (cfun)
                      && optimize_function_for_size_p (cfun));
-         cost = rtx_cost (x, SET, 0);
+         cost = set_src_cost (x, 0);
 
          if (cost < COSTS_N_INSNS (GCSE_UNRESTRICTED_COST))
            {
@@ -3713,17 +3713,15 @@ static bool
 gate_rtl_pre (void)
 {
   return optimize > 0 && flag_gcse
-         && optimize_function_for_speed_p (cfun);
+    && !cfun->calls_setjmp
+    && optimize_function_for_speed_p (cfun)
+    && dbg_cnt (pre);
 }
 
 static unsigned int
 execute_rtl_pre (void)
 {
   int changed;
-
-  if (cfun->calls_setjmp || !dbg_cnt (pre))
-    return 0;
-
   delete_unreachable_blocks ();
   df_analyze ();
   changed = one_pre_gcse_pass ();
@@ -3737,20 +3735,18 @@ static bool
 gate_rtl_hoist (void)
 {
   return optimize > 0 && flag_gcse
-        /* It does not make sense to run code hoisting unless we are optimizing
-         for code size -- it rarely makes programs faster, and can make then
-         bigger if we did PRE (when optimizing for space, we don't run PRE).  */
-        && optimize_function_for_size_p (cfun);
+    && !cfun->calls_setjmp
+    /* It does not make sense to run code hoisting unless we are optimizing
+       for code size -- it rarely makes programs faster, and can make then
+       bigger if we did PRE (when optimizing for space, we don't run PRE).  */
+    && optimize_function_for_size_p (cfun)
+    && dbg_cnt (hoist);
 }
 
 static unsigned int
 execute_rtl_hoist (void)
 {
   int changed;
-
-  if (cfun->calls_setjmp || !dbg_cnt (hoist))
-      return 0;
-
   delete_unreachable_blocks ();
   df_analyze ();
   changed = one_code_hoisting_pass ();
@@ -3776,7 +3772,6 @@ struct rtl_opt_pass pass_rtl_pre =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };
@@ -3797,7 +3792,6 @@ struct rtl_opt_pass pass_rtl_hoist =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func |
   TODO_verify_flow | TODO_ggc_collect   /* todo_flags_finish */
  }
 };