toplev.c (no_new_pseudos): Deleted.
authorKenneth Zadeck <zadeck@naturalbridge.com>
Wed, 11 Jul 2007 22:57:51 +0000 (22:57 +0000)
committerKenneth Zadeck <zadeck@gcc.gnu.org>
Wed, 11 Jul 2007 22:57:51 +0000 (22:57 +0000)
2007-07-11  Kenneth Zadeck <zadeck@naturalbridge.com>

* toplev.c (no_new_pseudos): Deleted.
* rtl.h (no_new_pseudos): Deleted.
* tree-pass.h (pass_no_new_pseudos): Deleted.
* passes.c (pass_no_new_pseudos): Deleted.
* final.c (rest_of_clean_state): Removed no_new_pseudos.
(rest_of_no_new_pseudos, pass_no_new_pseudos): Deleted.
* struct-equiv.c (rtx_equiv_p): Replaced no_new_pseudos with
reload_completed.
* cfgcleanup.c (try_crossjump_to_edge): Ditto.
* rtlhooks.c (gen_lowpart_general): Ditto.
* optabs.c (prepare_operand): Ditto.
* mode-switching.c (rest_of_handle_mode_switching): Deleted set of
no_new_pseudos.
* modulo-sched.c (rest_of_handle_sms): Ditto.
* see.c (rest_of_handle_see): Ditto.
* ifcvt.c (if_convert): Ditto.
(gate_handle_if_after_combine): Replaced no_new_pseudos with
reload_completed.
* init-regs.c (gate_initialize_regs): Deleted set of
no_new_pseudos.
* lower-subreg.c (decompose_multiword_subregs): Ditto.
* bb-reorder.c (rest_of_handle_partition_blocks): Ditto.
* doc/md.texi: Changed no_new_pseudos to can_create_pseudo_p.

From-SVN: r126561

18 files changed:
gcc/ChangeLog
gcc/bb-reorder.c
gcc/cfgcleanup.c
gcc/doc/md.texi
gcc/final.c
gcc/ifcvt.c
gcc/init-regs.c
gcc/lower-subreg.c
gcc/mode-switching.c
gcc/modulo-sched.c
gcc/optabs.c
gcc/passes.c
gcc/rtl.h
gcc/rtlhooks.c
gcc/see.c
gcc/struct-equiv.c
gcc/toplev.c
gcc/tree-pass.h

index 1e17ad3b6c4353f39a553eea914092444619038c..5be80244c9ea83374773e62ed5146107f78687ca 100644 (file)
@@ -1,3 +1,29 @@
+2007-07-11  Kenneth Zadeck <zadeck@naturalbridge.com>
+
+       * toplev.c (no_new_pseudos): Deleted.
+       * rtl.h (no_new_pseudos): Deleted.
+       * tree-pass.h (pass_no_new_pseudos): Deleted. 
+       * passes.c (pass_no_new_pseudos): Deleted.
+       * final.c (rest_of_clean_state): Removed no_new_pseudos.
+       (rest_of_no_new_pseudos, pass_no_new_pseudos): Deleted.
+       * struct-equiv.c (rtx_equiv_p): Replaced no_new_pseudos with 
+       reload_completed.
+       * cfgcleanup.c (try_crossjump_to_edge): Ditto. 
+       * rtlhooks.c (gen_lowpart_general): Ditto.
+       * optabs.c (prepare_operand): Ditto.
+       * mode-switching.c (rest_of_handle_mode_switching): Deleted set of
+       no_new_pseudos.
+       * modulo-sched.c (rest_of_handle_sms): Ditto.
+       * see.c (rest_of_handle_see): Ditto.
+       * ifcvt.c (if_convert): Ditto.
+       (gate_handle_if_after_combine): Replaced no_new_pseudos with 
+       reload_completed.
+       * init-regs.c (gate_initialize_regs): Deleted set of
+       no_new_pseudos.
+       * lower-subreg.c (decompose_multiword_subregs): Ditto. 
+       * bb-reorder.c (rest_of_handle_partition_blocks): Ditto.
+       * doc/md.texi: Changed no_new_pseudos to can_create_pseudo_p.
+       
 2007-07-11  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/32661
index 79e9dbf0d7eaf9136d735f88e156d3ba6151855c..dd6d30e4875794cd5e5690e29e8fc5f412a7e076 100644 (file)
@@ -2256,9 +2256,7 @@ gate_handle_partition_blocks (void)
 static unsigned int
 rest_of_handle_partition_blocks (void)
 {
-  no_new_pseudos = 0;
   partition_hot_cold_basic_blocks ();
-  no_new_pseudos = 1;
   return 0;
 }
 
index b34a2dbe6ab30029c91bad9b04984ae4be0e3770..1334e162fd7f4dadcc54943ce445bf7f6d4a68af 100644 (file)
@@ -1587,7 +1587,7 @@ try_crossjump_to_edge (int mode, edge e1, edge e2)
      partition boundaries).  See the comments at the top of
      bb-reorder.c:partition_hot_cold_basic_blocks for complete details.  */
 
-  if (flag_reorder_blocks_and_partition && no_new_pseudos)
+  if (flag_reorder_blocks_and_partition && reload_completed)
     return false;
 
   /* Search backward through forwarder blocks.  We don't need to worry
index dc45ed8acd18fa5a2d69ee6c8d79c786a7dd307d..0942e57349c8ac206ae052a3490f9be400cc7e87 100644 (file)
@@ -3435,8 +3435,8 @@ it can be allocated using @code{gen_reg_rtx} prior to life analysis.
 If there are cases which need scratch registers during or after reload,
 you must provide an appropriate secondary_reload target hook.
 
-@findex no_new_pseudos
-The global variable @code{no_new_pseudos} can be used to determine if it
+@findex can_create_pseudo_p
+The macro @code{can_create_pseudo_p} can be used to determine if it
 is unsafe to create new pseudo registers.  If this variable is nonzero, then
 it is unsafe to call @code{gen_reg_rtx} to allocate a new pseudo.
 
index 3dc4981fb7b16cc9f9bb27dd3e8a4c88e126cd3c..35a4b406f9f91fbcbfdcdf8feb3bfe566d821bb9 100644 (file)
@@ -4091,7 +4091,6 @@ rest_of_clean_state (void)
 
   reload_completed = 0;
   epilogue_completed = 0;
-  no_new_pseudos = 0;
 #ifdef STACK_REGS
   regstack_completed = 0;
 #endif
@@ -4147,27 +4146,3 @@ struct tree_opt_pass pass_clean_state =
   0                                     /* letter */
 };
 
-/* Set no_new_pseudos.  */
-static unsigned int
-rest_of_no_new_pseudos (void)
-{
-  no_new_pseudos = 1;
-  return 0;
-}
-
-struct tree_opt_pass pass_no_new_pseudos =
-{
-  NULL,                                        /* name */
-  NULL,                                 /* gate */
-  rest_of_no_new_pseudos,               /* execute */
-  NULL,                                 /* sub */
-  NULL,                                 /* next */
-  0,                                    /* static_pass_number */
-  0,                                    /* tv_id */
-  0,                                    /* properties_required */
-  0,                                    /* properties_provided */
-  0,                                    /* properties_destroyed */
-  0,                                    /* todo_flags_start */
-  0,                                    /* todo_flags_finish */
-  'p'                                   /* letter */
-};
index 8a346bb5f4e56454a7bbc446a004c50e24a14a9e..0d6d49ead5078c82746975b1d37577acd7f61a7e 100644 (file)
@@ -3968,10 +3968,6 @@ if_convert (bool recompute_dominance)
   num_updated_if_blocks = 0;
   num_true_changes = 0;
 
-  /* Some transformations in this pass can create new pseudos,
-     if the pass runs before reload.  Make sure we can do so.  */
-  gcc_assert (! no_new_pseudos || reload_completed);
-
   loop_optimizer_init (AVOID_CFG_MODIFICATIONS);
   mark_loop_exit_edges ();
   loop_optimizer_finalize ();
@@ -4105,9 +4101,7 @@ gate_handle_if_after_combine (void)
 static unsigned int
 rest_of_handle_if_after_combine (void)
 {
-  no_new_pseudos = 0;
   if_convert (true);
-  no_new_pseudos = 1;
   return 0;
 }
 
index 7e4d0565122e5ae48d59d465b6d9602e580aeb01..567b5d1744b44776f2a5032f382b1f83ac4db916 100644 (file)
@@ -132,9 +132,7 @@ gate_initialize_regs (void)
 static unsigned int
 rest_of_handle_initialize_regs (void)
 {
-  no_new_pseudos = 0;
   initialize_uninitialized_regs ();
-  no_new_pseudos = 1;
   return 0;
 }
 
index ea141401cf2c593a1bf0a514a2c355598f853b1b..828d90d27c939773f5ecdc3b1fe089846f69f49f 100644 (file)
@@ -1070,7 +1070,6 @@ decompose_multiword_subregs (void)
   bitmap_and_compl_into (decomposable_context, non_decomposable_context);
   if (!bitmap_empty_p (decomposable_context))
     {
-      int hold_no_new_pseudos = no_new_pseudos;
       sbitmap sub_blocks;
       unsigned int i;
       sbitmap_iterator sbi;
@@ -1079,7 +1078,6 @@ decompose_multiword_subregs (void)
 
       propagate_pseudo_copies ();
 
-      no_new_pseudos = 0;
       sub_blocks = sbitmap_alloc (last_basic_block);
       sbitmap_zero (sub_blocks);
 
@@ -1185,8 +1183,6 @@ decompose_multiword_subregs (void)
            }
        }
 
-      no_new_pseudos = hold_no_new_pseudos;
-
       /* If we had insns to split that caused control flow insns in the middle
         of a basic block, split those blocks now.  Note that we only handle
         the case where splitting a load has caused multiple possibly trapping
index e935acdd9792dce13673d1bed5b0a39337389bfa..3fdb2b4137e2f9c6b62cfbae18cafbb698627ce0 100644 (file)
@@ -740,9 +740,7 @@ static unsigned int
 rest_of_handle_mode_switching (void)
 {
 #ifdef OPTIMIZE_MODE_SWITCHING
-  no_new_pseudos = 0;
   optimize_mode_switching ();
-  no_new_pseudos = 1;
 #endif /* OPTIMIZE_MODE_SWITCHING */
   return 0;
 }
index bf9bc9b7dcd5fed833e6ea98b3378dcfc97e4212..a0ff4a7b041777a70f28f36ec3ae9a66e9f45d9d 100644 (file)
@@ -2472,15 +2472,12 @@ rest_of_handle_sms (void)
 #ifdef INSN_SCHEDULING
   basic_block bb;
 
-  /* We want to be able to create new pseudos.  */
-  no_new_pseudos = 0;
   /* Collect loop information to be used in SMS.  */
   cfg_layout_initialize (0);
   sms_schedule ();
 
   /* Update the life information, because we add pseudos.  */
   max_regno = max_reg_num ();
-  no_new_pseudos = 1;
 
   /* Finalize layout changes.  */
   FOR_EACH_BB (bb)
index 1af4388ef328d6cd0ab8d99ec7e6396273d77bb3..95b2ec9b2321b3459728b757aa60dcbe2704a921 100644 (file)
@@ -3953,7 +3953,7 @@ prepare_operand (int icode, rtx x, int opnum, enum machine_mode mode,
   if (!insn_data[icode].operand[opnum].predicate
       (x, insn_data[icode].operand[opnum].mode))
     {
-      if (no_new_pseudos)
+      if (reload_completed)
        return NULL_RTX;
       x = copy_to_mode_reg (insn_data[icode].operand[opnum].mode, x);
     }
index 48ea68e0b8c2ad5db6a160bed48921c50c28f708..0f39d61d546ffa1956c8650fea38f0019068272a 100644 (file)
@@ -727,7 +727,6 @@ init_optimization_passes (void)
       NEXT_PASS (pass_regclass_init);
       NEXT_PASS (pass_inc_dec);
       NEXT_PASS (pass_initialize_regs);
-      NEXT_PASS (pass_no_new_pseudos);
       NEXT_PASS (pass_outof_cfg_layout_mode);
       NEXT_PASS (pass_ud_rtl_dce);
       NEXT_PASS (pass_combine);
index 689efa52f37afa2983317b13eb8a6dd31b623804..124f5280950605d976d899f040e1edea35e79ff6 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1977,10 +1977,6 @@ extern int regstack_completed;
    the same indirect address eventually.  */
 extern int cse_not_expected;
 
-/* Set to nonzero before life analysis to indicate that it is unsafe to
-   generate any new pseudo registers.  */
-extern int no_new_pseudos;
-
 /* Translates rtx code to tree code, for those codes needed by
    REAL_ARITHMETIC.  The function returns an int because the caller may not
    know what `enum tree_code' means.  */
index 79fcb4453090c11e11c9c7d8a4ffeecb0a76c1b4..a0ad851c11b16db3717e7024539bd8e554629283 100644 (file)
@@ -66,7 +66,7 @@ gen_lowpart_general (enum machine_mode mode, rtx x)
          && SCALAR_INT_MODE_P (GET_MODE (x))
          && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
                                    GET_MODE_BITSIZE (GET_MODE (x)))
-         && ! no_new_pseudos)
+         && !reload_completed)
        return gen_lowpart_general (mode, force_reg (GET_MODE (x), x));
 
       if (WORDS_BIG_ENDIAN)
index f5cacdee93f904a60e345d99afe100447c4a6872..cba0721659ddb225d9a7a6f3e7af4513c911123b 100644 (file)
--- a/gcc/see.c
+++ b/gcc/see.c
@@ -3814,12 +3814,7 @@ gate_handle_see (void)
 static unsigned int
 rest_of_handle_see (void)
 {
-  int no_new_pseudos_bcp = no_new_pseudos;
-
-  no_new_pseudos = 0;
   see_main ();
-  no_new_pseudos = no_new_pseudos_bcp;
-  
   run_fast_dce ();
   return 0;
 }
index 3658e87b748fe5b872bbcc3989f3e1f1db2a0198..395fef2a550cc7cadcd4c0325fedee84706810a9 100644 (file)
@@ -431,7 +431,7 @@ rtx_equiv_p (rtx *xp, rtx y, int rvalue, struct equiv_info *info)
          return false;
        else if (x_common_live)
          {
-           if (! rvalue || info->input_cost < 0 || no_new_pseudos)
+           if (! rvalue || info->input_cost < 0 || reload_completed)
              return false;
            /* If info->live_update is not set, we are processing notes.
               We then allow a match with x_input / y_input found in a
index c421e56658aea864be09bf18b52f4869bdd18eea..ff0d8a3ea7defd53c1e149ba670b14b5b237ea83 100644 (file)
@@ -149,9 +149,6 @@ location_t input_location;
 
 struct line_maps line_table;
 
-/* Nonzero if it is unsafe to create any new pseudo registers.  */
-int no_new_pseudos;
-
 /* Stack of currently pending input files.  */
 
 struct file_stack *input_file_stack;
index 8838127a4402486d4ad5898f9509a2d56dd238a6..a2271cbb646dee0eeb653ecde2b6042ace4bb34b 100644 (file)
@@ -384,7 +384,6 @@ extern struct tree_opt_pass pass_regclass_init;
 extern struct tree_opt_pass pass_subregs_of_mode_init;
 extern struct tree_opt_pass pass_subregs_of_mode_finish;
 extern struct tree_opt_pass pass_inc_dec;
-extern struct tree_opt_pass pass_no_new_pseudos;
 extern struct tree_opt_pass pass_stack_ptr_mod;
 extern struct tree_opt_pass pass_initialize_regs;
 extern struct tree_opt_pass pass_combine;