Commit fd743bc1 by Paolo Bonzini Committed by Paolo Bonzini

emit-rtl.c (unshare_all_rtl_1): New name of unshare_all_rtl.

2004-06-18  Paolo Bonzini  <bonzini@gnu.org>

	* emit-rtl.c (unshare_all_rtl_1): New name of unshare_all_rtl.
	(unshare_all_rtl_again): Call unshare_all_rtl_1.
	(unshare_all_rtl): New.
	* function.c (instantiate_virtual_regs): Remove parameters.
	* function.h (instantiate_virtual_regs): Add prototype.
	* rtl.h (unshare_all_rtl): Add prototype.
	* tree.h (instantiate_virtual_regs, unshare_all_rtl): Remove
	prototype.
	* passes.c: Remove assertions on the parameters to
	rest_of_handle_* functions.  Remove the parameters to
	the functions, replacing decl with current_function_decl
	and insns with get_insns ().

From-SVN: r83341
parent 24a88b0c
2004-06-18 Paolo Bonzini <bonzini@gnu.org>
* emit-rtl.c (unshare_all_rtl_1): New name of unshare_all_rtl.
(unshare_all_rtl_again): Call unshare_all_rtl_1.
(unshare_all_rtl): New.
* function.c (instantiate_virtual_regs): Remove parameters.
* function.h (instantiate_virtual_regs): Add prototype.
* rtl.h (unshare_all_rtl): Add prototype.
* tree.h (instantiate_virtual_regs, unshare_all_rtl): Remove
prototype.
* passes.c: Remove assertions on the parameters to
rest_of_handle_* functions. Remove the parameters to
the functions, replacing decl with current_function_decl
and insns with get_insns ().
2004-06-17 Roger Sayle <roger@eyesopen.com> 2004-06-17 Roger Sayle <roger@eyesopen.com>
* fold-const.c (constant_boolean_node): Handle boolean_type_node * fold-const.c (constant_boolean_node): Handle boolean_type_node
......
...@@ -2148,8 +2148,8 @@ restore_emit_status (struct function *p ATTRIBUTE_UNUSED) ...@@ -2148,8 +2148,8 @@ restore_emit_status (struct function *p ATTRIBUTE_UNUSED)
/* Go through all the RTL insn bodies and copy any invalid shared /* Go through all the RTL insn bodies and copy any invalid shared
structure. This routine should only be called once. */ structure. This routine should only be called once. */
void static void
unshare_all_rtl (tree fndecl, rtx insn) unshare_all_rtl_1 (tree fndecl, rtx insn)
{ {
tree decl; tree decl;
...@@ -2200,7 +2200,13 @@ unshare_all_rtl_again (rtx insn) ...@@ -2200,7 +2200,13 @@ unshare_all_rtl_again (rtx insn)
reset_used_flags (stack_slot_list); reset_used_flags (stack_slot_list);
unshare_all_rtl (cfun->decl, insn); unshare_all_rtl_1 (cfun->decl, insn);
}
void
unshare_all_rtl (void)
{
unshare_all_rtl_1 (current_function_decl, get_insns ());
} }
/* Check that ORIG is not marked when it should not be and mark ORIG as in use, /* Check that ORIG is not marked when it should not be and mark ORIG as in use,
......
...@@ -3596,30 +3596,30 @@ purge_hard_subreg_sets (rtx insn) ...@@ -3596,30 +3596,30 @@ purge_hard_subreg_sets (rtx insn)
references to hard register references. */ references to hard register references. */
void void
instantiate_virtual_regs (tree fndecl, rtx insns) instantiate_virtual_regs (void)
{ {
rtx insn; rtx insn;
unsigned int i; unsigned int i;
/* Compute the offsets to use for this function. */ /* Compute the offsets to use for this function. */
in_arg_offset = FIRST_PARM_OFFSET (fndecl); in_arg_offset = FIRST_PARM_OFFSET (current_function_decl);
var_offset = STARTING_FRAME_OFFSET; var_offset = STARTING_FRAME_OFFSET;
dynamic_offset = STACK_DYNAMIC_OFFSET (fndecl); dynamic_offset = STACK_DYNAMIC_OFFSET (current_function_decl);
out_arg_offset = STACK_POINTER_OFFSET; out_arg_offset = STACK_POINTER_OFFSET;
cfa_offset = ARG_POINTER_CFA_OFFSET (fndecl); cfa_offset = ARG_POINTER_CFA_OFFSET (current_function_decl);
/* Scan all variables and parameters of this function. For each that is /* Scan all variables and parameters of this function. For each that is
in memory, instantiate all virtual registers if the result is a valid in memory, instantiate all virtual registers if the result is a valid
address. If not, we do it later. That will handle most uses of virtual address. If not, we do it later. That will handle most uses of virtual
regs on many machines. */ regs on many machines. */
instantiate_decls (fndecl, 1); instantiate_decls (current_function_decl, 1);
/* Initialize recognition, indicating that volatile is OK. */ /* Initialize recognition, indicating that volatile is OK. */
init_recog (); init_recog ();
/* Scan through all the insns, instantiating every virtual register still /* Scan through all the insns, instantiating every virtual register still
present. */ present. */
for (insn = insns; insn; insn = NEXT_INSN (insn)) for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
|| GET_CODE (insn) == CALL_INSN) || GET_CODE (insn) == CALL_INSN)
{ {
...@@ -3647,7 +3647,7 @@ instantiate_virtual_regs (tree fndecl, rtx insns) ...@@ -3647,7 +3647,7 @@ instantiate_virtual_regs (tree fndecl, rtx insns)
/* Now instantiate the remaining register equivalences for debugging info. /* Now instantiate the remaining register equivalences for debugging info.
These will not be valid addresses. */ These will not be valid addresses. */
instantiate_decls (fndecl, 0); instantiate_decls (current_function_decl, 0);
/* Indicate that, from now on, assign_stack_local should use /* Indicate that, from now on, assign_stack_local should use
frame_pointer_rtx. */ frame_pointer_rtx. */
......
...@@ -613,6 +613,7 @@ extern void use_return_register (void); ...@@ -613,6 +613,7 @@ extern void use_return_register (void);
extern rtx get_arg_pointer_save_area (struct function *); extern rtx get_arg_pointer_save_area (struct function *);
extern void init_virtual_regs (struct emit_status *); extern void init_virtual_regs (struct emit_status *);
extern void instantiate_virtual_regs (void);
/* Returns the name of the current function. */ /* Returns the name of the current function. */
extern const char *current_function_name (void); extern const char *current_function_name (void);
......
...@@ -2177,6 +2177,7 @@ extern void pop_topmost_sequence (void); ...@@ -2177,6 +2177,7 @@ extern void pop_topmost_sequence (void);
extern void reverse_comparison (rtx); extern void reverse_comparison (rtx);
extern void set_new_first_and_last_insn (rtx, rtx); extern void set_new_first_and_last_insn (rtx, rtx);
extern void set_new_last_label_num (int); extern void set_new_last_label_num (int);
extern void unshare_all_rtl (void);
extern void unshare_all_rtl_again (rtx); extern void unshare_all_rtl_again (rtx);
extern void unshare_all_rtl_in_chain (rtx); extern void unshare_all_rtl_in_chain (rtx);
extern void verify_rtl_sharing (void); extern void verify_rtl_sharing (void);
......
...@@ -3415,8 +3415,6 @@ extern void preserve_temp_slots (rtx); ...@@ -3415,8 +3415,6 @@ extern void preserve_temp_slots (rtx);
extern void preserve_rtl_expr_temps (tree); extern void preserve_rtl_expr_temps (tree);
extern int aggregate_value_p (tree, tree); extern int aggregate_value_p (tree, tree);
extern void free_temps_for_rtl_expr (tree); extern void free_temps_for_rtl_expr (tree);
extern void instantiate_virtual_regs (tree, rtx);
extern void unshare_all_rtl (tree, rtx);
extern void push_function_context (void); extern void push_function_context (void);
extern void pop_function_context (void); extern void pop_function_context (void);
extern void push_function_context_to (tree); extern void push_function_context_to (tree);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment