diff options
author | Kenneth Zadeck <zadeck@naturalbridge.com> | 2007-07-11 22:57:51 +0000 |
---|---|---|
committer | Kenneth Zadeck <zadeck@gcc.gnu.org> | 2007-07-11 22:57:51 +0000 |
commit | ef4375b218c4dfbd305532790892beb5307f8c2c (patch) | |
tree | 661a2bd8e3dcb30517cb9fc58f05901d2e4ef6cf /gcc | |
parent | d90dc4fc7f0aeab51d520a5f750a3150de401ac3 (diff) | |
download | gcc-ef4375b218c4dfbd305532790892beb5307f8c2c.zip gcc-ef4375b218c4dfbd305532790892beb5307f8c2c.tar.gz gcc-ef4375b218c4dfbd305532790892beb5307f8c2c.tar.bz2 |
toplev.c (no_new_pseudos): Deleted.
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 26 | ||||
-rw-r--r-- | gcc/bb-reorder.c | 2 | ||||
-rw-r--r-- | gcc/cfgcleanup.c | 2 | ||||
-rw-r--r-- | gcc/doc/md.texi | 4 | ||||
-rw-r--r-- | gcc/final.c | 25 | ||||
-rw-r--r-- | gcc/ifcvt.c | 6 | ||||
-rw-r--r-- | gcc/init-regs.c | 2 | ||||
-rw-r--r-- | gcc/lower-subreg.c | 4 | ||||
-rw-r--r-- | gcc/mode-switching.c | 2 | ||||
-rw-r--r-- | gcc/modulo-sched.c | 3 | ||||
-rw-r--r-- | gcc/optabs.c | 2 | ||||
-rw-r--r-- | gcc/passes.c | 1 | ||||
-rw-r--r-- | gcc/rtl.h | 4 | ||||
-rw-r--r-- | gcc/rtlhooks.c | 2 | ||||
-rw-r--r-- | gcc/see.c | 5 | ||||
-rw-r--r-- | gcc/struct-equiv.c | 2 | ||||
-rw-r--r-- | gcc/toplev.c | 3 | ||||
-rw-r--r-- | gcc/tree-pass.h | 1 |
18 files changed, 32 insertions, 64 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1e17ad3..5be8024 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 79e9dbf..dd6d30e 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -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; } diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index b34a2db..1334e16 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -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 diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index dc45ed8..0942e57 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -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. diff --git a/gcc/final.c b/gcc/final.c index 3dc4981..35a4b40 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -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 */ -}; diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 8a346bb..0d6d49e 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -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; } diff --git a/gcc/init-regs.c b/gcc/init-regs.c index 7e4d056..567b5d1 100644 --- a/gcc/init-regs.c +++ b/gcc/init-regs.c @@ -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; } diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index ea14140..828d90d 100644 --- a/gcc/lower-subreg.c +++ b/gcc/lower-subreg.c @@ -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 diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c index e935acd..3fdb2b4 100644 --- a/gcc/mode-switching.c +++ b/gcc/mode-switching.c @@ -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; } diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c index bf9bc9b..a0ff4a7 100644 --- a/gcc/modulo-sched.c +++ b/gcc/modulo-sched.c @@ -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) diff --git a/gcc/optabs.c b/gcc/optabs.c index 1af4388..95b2ec9 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -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); } diff --git a/gcc/passes.c b/gcc/passes.c index 48ea68e..0f39d61 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -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); @@ -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. */ diff --git a/gcc/rtlhooks.c b/gcc/rtlhooks.c index 79fcb44..a0ad851 100644 --- a/gcc/rtlhooks.c +++ b/gcc/rtlhooks.c @@ -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) @@ -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; } diff --git a/gcc/struct-equiv.c b/gcc/struct-equiv.c index 3658e87..395fef2 100644 --- a/gcc/struct-equiv.c +++ b/gcc/struct-equiv.c @@ -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 diff --git a/gcc/toplev.c b/gcc/toplev.c index c421e56..ff0d8a3 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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; diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index 8838127..a2271cb 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -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; |