diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-28 00:12:41 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-28 00:12:41 +0000 |
commit | f24e9d92692a8345c79531ba22825135cd15a32a (patch) | |
tree | 2736d7d7941b48fd63e1b71a3c5182d1b4de78d8 /gcc/stupid.c | |
parent | 178f13e60fdc7668e83d934df00de60c3a7a2905 (diff) | |
download | ppe42-gcc-f24e9d92692a8345c79531ba22825135cd15a32a.tar.gz ppe42-gcc-f24e9d92692a8345c79531ba22825135cd15a32a.zip |
* basic-block.h (basic_block_computed_jump_target): Declare.
* flags.h: (current_function_has_computed_jump): Declare.
* flow.c: (basic_block_computed_jump_target): Define.
(flow_analysis): Allocate it. Set current_function_has_computed_jump
to 0.
(find_basic_blocks): Set current_function_has_computed_jump and
elements of basic_block_computed_jump_target to 1 as appropriate.
* function.c: (current_function_has_computed_jump): Define.
* global.c (global_conflicts): Don't allocate pseudos into stack regs
at the start of a block that is reachable by a computed jump.
* reg-stack.c (stack_reg_life_analysis): If must restart, do so
immediately.
(subst_stack_regs): Undo change from Sep 4 1997.
(uses_reg_or_mem): Now unused, deleted.
* stupid.c (stupid_life_analysis): Compute
current_function_has_computed_jump.
(stupid_find_reg): Don't allocate stack regs if the function has a
computed goto.
* haifa-sched.c (is_cfg_nonregular): Delete code to determine if
the current function has a computed jump. Use the global value
instead.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18860 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stupid.c')
-rw-r--r-- | gcc/stupid.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/stupid.c b/gcc/stupid.c index 3af13a104b0..8b1153682fa 100644 --- a/gcc/stupid.c +++ b/gcc/stupid.c @@ -130,6 +130,8 @@ stupid_life_analysis (f, nregs, file) register rtx last, insn; int max_uid, max_suid; + current_function_has_computed_jump = 0; + bzero (regs_ever_live, sizeof regs_ever_live); regs_live = (char *) alloca (nregs); @@ -265,6 +267,8 @@ stupid_life_analysis (f, nregs, file) be live if it's also used to pass arguments. */ stupid_mark_refs (CALL_INSN_FUNCTION_USAGE (insn), insn); } + if (GET_CODE (insn) == JUMP_INSN && computed_jump_p (insn)) + current_function_has_computed_jump = 1; } /* Now decide the order in which to allocate the pseudo registers. */ @@ -394,6 +398,12 @@ stupid_find_reg (call_preserved, class, mode, for (ins = born_insn; ins < dead_insn; ins++) IOR_HARD_REG_SET (used, after_insn_hard_regs[ins]); +#ifdef STACK_REGS + if (current_function_has_computed_jump) + for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++) + SET_HARD_REG_BIT (used, i); +#endif + IOR_COMPL_HARD_REG_SET (used, reg_class_contents[(int) class]); #ifdef CLASS_CANNOT_CHANGE_SIZE |