diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-19 09:42:11 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-19 09:42:11 +0000 |
commit | dd2acd8374435c683ec974b753193dfdd6065a14 (patch) | |
tree | 1279f2c86a2d7f56c162a81d8ff2ce20872bda4f /gcc/function.c | |
parent | 5d3807c2808ca1d4ec7de18e64484544e26a5f63 (diff) | |
download | gcc-dd2acd8374435c683ec974b753193dfdd6065a14.tar.gz |
* stupid.c: Die die die.
* Makefile.in (OBJS): Remove stupid.o.
(stupid.o): Likewise.
* except.c (emit_eh_context): Don't emit USEs for stupid.
* explow.c (probe_stack_range): Likewise.
* flags.h (obey_regdecls): Remove.
* flow.c (find_basic_blocks): Don't run try_merge_blocks
when not optimizing.
(life_analysis): Limit data collection when not optimizing.
(mark_regs_live_at_end): Always mark the return value registers.
(mark_used_regs): Remove dummy RETURN case.
(print_rtl_with_bb): Don't consult obey_regdecls.
* function.c (use_variable, use_variable_after): Remove.
(assign_parms): Consult optimize not obey_regdecls.
(expand_function_start): Don't emit USEs for stupid.
(expand_function_end): Likewise.
* global.c (build_insn_chain): Export.
* integrate.c (expand_inline_function): Kill return-value USE
handling code.
* jump.c (jump_optimize_1): Do simple jump optimizations and
dead code elimination.
(calculate_can_reach_end): Remove check_deleted argument.
(delete_insn): Patch out insns even when not optimizing.
* local-alloc.c (block_alloc): Don't do tying when not optimizing.
* rtl.h (use_variable, use_variable_after): Remove declarations.
(build_insn_chain): Declare.
* stmt.c (expand_value_return): Don't emit USEs for stupid.
(expand_end_bindings): Likewise.
(expand_decl): Likewise. Consult optimize not obey_regdecls.
* toplev.c (obey_regdecls): Remove.
(rest_of_compilation): Don't set it. Kill stupid in favour of
flow1, local-alloc, and reload.
(main): Don't set obey_regdecls.
* config/nextstep.c (handle_pragma): Likewise.
* alpha/alpha.md (allocate_stack): Don't emit USEs for stupid.
* arm/arm.h (CONDITIONAL_REGISTER_USAGE): Don't fix reg 0 for stupid.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31499 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 89 |
1 files changed, 8 insertions, 81 deletions
diff --git a/gcc/function.c b/gcc/function.c index fffeb73e50f..9006d16dd9b 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3916,45 +3916,6 @@ delete_handlers () } } -/* Output a USE for any register use in RTL. - This is used with -noreg to mark the extent of lifespan - of any registers used in a user-visible variable's DECL_RTL. */ - -void -use_variable (rtl) - rtx rtl; -{ - if (GET_CODE (rtl) == REG) - /* This is a register variable. */ - emit_insn (gen_rtx_USE (VOIDmode, rtl)); - else if (GET_CODE (rtl) == MEM - && GET_CODE (XEXP (rtl, 0)) == REG - && (REGNO (XEXP (rtl, 0)) < FIRST_VIRTUAL_REGISTER - || REGNO (XEXP (rtl, 0)) > LAST_VIRTUAL_REGISTER) - && XEXP (rtl, 0) != current_function_internal_arg_pointer) - /* This is a variable-sized structure. */ - emit_insn (gen_rtx_USE (VOIDmode, XEXP (rtl, 0))); -} - -/* Like use_variable except that it outputs the USEs after INSN - instead of at the end of the insn-chain. */ - -void -use_variable_after (rtl, insn) - rtx rtl, insn; -{ - if (GET_CODE (rtl) == REG) - /* This is a register variable. */ - emit_insn_after (gen_rtx_USE (VOIDmode, rtl), insn); - else if (GET_CODE (rtl) == MEM - && GET_CODE (XEXP (rtl, 0)) == REG - && (REGNO (XEXP (rtl, 0)) < FIRST_VIRTUAL_REGISTER - || REGNO (XEXP (rtl, 0)) > LAST_VIRTUAL_REGISTER) - && XEXP (rtl, 0) != current_function_internal_arg_pointer) - /* This is a variable-sized structure. */ - emit_insn_after (gen_rtx_USE (VOIDmode, XEXP (rtl, 0)), insn); -} - int max_parm_reg_num () { @@ -4495,7 +4456,8 @@ assign_parms (fndecl) } DECL_RTL (parm) = stack_parm; } - else if (! ((obey_regdecls && ! DECL_REGISTER (parm) + else if (! ((! optimize + && ! DECL_REGISTER (parm) && ! DECL_INLINE (fndecl)) /* layout_decl may set this. */ || TREE_ADDRESSABLE (parm) @@ -4579,7 +4541,8 @@ assign_parms (fndecl) /* If we were passed a pointer but the actual value can safely live in a register, put it in one. */ if (passed_pointer && TYPE_MODE (TREE_TYPE (parm)) != BLKmode - && ! ((obey_regdecls && ! DECL_REGISTER (parm) + && ! ((! optimize + && ! DECL_REGISTER (parm) && ! DECL_INLINE (fndecl)) /* layout_decl may set this. */ || TREE_ADDRESSABLE (parm) @@ -6064,32 +6027,19 @@ expand_function_start (subr, parms_have_cleanups) as opposed to parm setup. */ emit_note (NULL_PTR, NOTE_INSN_FUNCTION_BEG); - /* If doing stupid allocation, mark parms as born here. */ - if (GET_CODE (get_last_insn ()) != NOTE) emit_note (NULL_PTR, NOTE_INSN_DELETED); parm_birth_insn = get_last_insn (); - if (obey_regdecls) - { - for (i = LAST_VIRTUAL_REGISTER + 1; i < max_parm_reg; i++) - use_variable (regno_reg_rtx[i]); - - if (current_function_internal_arg_pointer != virtual_incoming_args_rtx) - use_variable (current_function_internal_arg_pointer); - } - context_display = 0; if (current_function_needs_context) { /* Fetch static chain values for containing functions. */ tem = decl_function_context (current_function_decl); - /* If not doing stupid register allocation copy the static chain - pointer into a pseudo. If we have small register classes, copy - the value from memory if static_chain_incoming_rtx is a REG. If - we do stupid register allocation, we use the stack address - generated above. */ - if (tem && ! obey_regdecls) + /* Copy the static chain pointer into a pseudo. If we have + small register classes, copy the value from memory if + static_chain_incoming_rtx is a REG. */ + if (tem) { /* If the static chain originally came in a register, put it back there, then move it out in the next insn. The reason for @@ -6349,27 +6299,6 @@ expand_function_end (filename, line, end_bindings) until next function's body starts. */ immediate_size_expand--; - /* If doing stupid register allocation, - mark register parms as dying here. */ - - if (obey_regdecls) - { - rtx tem; - for (i = LAST_VIRTUAL_REGISTER + 1; i < max_parm_reg; i++) - use_variable (regno_reg_rtx[i]); - - /* Likewise for the regs of all the SAVE_EXPRs in the function. */ - - for (tem = save_expr_regs; tem; tem = XEXP (tem, 1)) - { - use_variable (XEXP (tem, 0)); - use_variable_after (XEXP (tem, 0), parm_birth_insn); - } - - if (current_function_internal_arg_pointer != virtual_incoming_args_rtx) - use_variable (current_function_internal_arg_pointer); - } - clear_pending_stack_adjust (); do_pending_stack_adjust (); @@ -6488,7 +6417,6 @@ expand_function_end (filename, line, end_bindings) GET_MODE (DECL_RTL (DECL_RESULT (current_function_decl)))); emit_move_insn (real_decl_result, DECL_RTL (DECL_RESULT (current_function_decl))); - emit_insn (gen_rtx_USE (VOIDmode, real_decl_result)); /* The delay slot scheduler assumes that current_function_return_rtx holds the hard register containing the return value, not a temporary @@ -6522,7 +6450,6 @@ expand_function_end (filename, line, end_bindings) REG_FUNCTION_VALUE_P (outgoing) = 1; emit_move_insn (outgoing, value_address); - use_variable (outgoing); } /* If this is an implementation of __throw, do what's necessary to |