diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-15 09:39:30 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-15 09:39:30 +0000 |
commit | 613172207b7ce182da93de2237405652ce34a4d6 (patch) | |
tree | dcc9e5b2879fa3fbd06b71b8cf966772d254405b /gcc/flow.c | |
parent | 86484e7f20c49054415e308237678b530fece61e (diff) | |
download | gcc-613172207b7ce182da93de2237405652ce34a4d6.tar.gz |
* basic-block.h (life_analysis, delete_noop_moves):
Update prototypes.
* bt-load.c (branch_target_load_optimize): Don't take the
insns stream as an argument. Update the life_analysis calls.
* combine.c (combine_instructions): Update delete_noop_moves
calls.
* flow.c (notice_stack_pointer_modification): Don't take the
insns stream as an argument. Work on the flow graph.
(life_analysis): Likewise.
(delete_noop_moves): Likewise.
* passes.c (rest_of_handle_stack_regs): Update reg_to_stack call.
(rest_of_handle_life): Update life_analysis call.
(rest_of_compilation): Likewise, and also update
branch_target_load_optimize call.
* ra.c (reg_alloc): Update life_analysis call.
* reg-stack.c (reg_to_stack): Likewise. Also, don't take
the insns stream as an argument.
* regrename.c (copyprop_hardreg_forward): Update delete_noop_moves
call.
* rtl.c (branch_target_load_optimize, reg_to_stack): Update
prototypes.
* value-profile.c (branch_prob): Update life_analysis call.
* web.c (web_main): Work on the CFG, not on the insns stream.
* config/ip2k/ip2k.c (ip2k_reorg): Update life_analysis calls.
* config/m68hc11/m68hc11.c (m68hc11_reorg): Likewise.
* config/sh/sh.c (sh_output_mi_thunk): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81873 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/gcc/flow.c b/gcc/flow.c index fa47f2d24a0..818f8eb0043 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -291,7 +291,7 @@ static int verify_wide_reg_1 (rtx *, void *); static void verify_wide_reg (int, basic_block); static void verify_local_live_at_start (regset, basic_block); static void notice_stack_pointer_modification_1 (rtx, rtx, void *); -static void notice_stack_pointer_modification (rtx); +static void notice_stack_pointer_modification (void); static void mark_reg (rtx, void *); static void mark_regs_live_at_end (regset); static void calculate_global_regs_live (sbitmap, sbitmap, int); @@ -351,12 +351,11 @@ first_insn_after_basic_block_note (basic_block block) return NEXT_INSN (insn); } -/* Perform data flow analysis. - F is the first insn of the function; FLAGS is a set of PROP_* flags - to be used in accumulating flow info. */ +/* Perform data flow analysis for the whole control flow graph. + FLAGS is a set of PROP_* flags to be used in accumulating flow info. */ void -life_analysis (rtx f, FILE *file, int flags) +life_analysis (FILE *file, int flags) { #ifdef ELIMINABLE_REGS int i; @@ -403,13 +402,13 @@ life_analysis (rtx f, FILE *file, int flags) /* Always remove no-op moves. Do this before other processing so that we don't have to keep re-scanning them. */ - delete_noop_moves (f); + delete_noop_moves (); /* Some targets can emit simpler epilogues if they know that sp was not ever modified during the function. After reload, of course, we've already emitted the epilogue so there's no sense searching. */ if (! reload_completed) - notice_stack_pointer_modification (f); + notice_stack_pointer_modification (); /* Allocate and zero out data structures that will record the data from lifetime analysis. */ @@ -782,7 +781,7 @@ free_basic_block_vars (void) /* Delete any insns that copy a register to itself. */ int -delete_noop_moves (rtx f ATTRIBUTE_UNUSED) +delete_noop_moves (void) { rtx insn, next; basic_block bb; @@ -866,8 +865,9 @@ notice_stack_pointer_modification_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, } static void -notice_stack_pointer_modification (rtx f) +notice_stack_pointer_modification (void) { + basic_block bb; rtx insn; /* Assume that the stack pointer is unchanging if alloca hasn't @@ -876,17 +876,19 @@ notice_stack_pointer_modification (rtx f) if (! current_function_sp_is_unchanging) return; - for (insn = f; insn; insn = NEXT_INSN (insn)) - { - if (INSN_P (insn)) - { - /* Check if insn modifies the stack pointer. */ - note_stores (PATTERN (insn), notice_stack_pointer_modification_1, - NULL); - if (! current_function_sp_is_unchanging) - return; - } - } + FOR_EACH_BB (bb) + FOR_BB_INSNS (bb, insn) + { + if (INSN_P (insn)) + { + /* Check if insn modifies the stack pointer. */ + note_stores (PATTERN (insn), + notice_stack_pointer_modification_1, + NULL); + if (! current_function_sp_is_unchanging) + return; + } + } } /* Mark a register in SET. Hard registers in large modes get all |