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/haifa-sched.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/haifa-sched.c')
-rw-r--r-- | gcc/haifa-sched.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 967e8689a37..046c3531546 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -1098,6 +1098,11 @@ is_cfg_nonregular () if (forced_labels) return 1; + /* If this function has a computed jump, then we consider the cfg + not well structured. */ + if (current_function_has_computed_jump) + return 1; + /* If we have exception handlers, then we consider the cfg not well structured. ?!? We should be able to handle this now that flow.c computes an accurate cfg for EH. */ @@ -1124,20 +1129,6 @@ is_cfg_nonregular () break; } - /* If this function has a computed jump, then we consider the cfg - not well structured. */ - for (b = 0; b < n_basic_blocks; b++) - { - for (insn = basic_block_head[b];; insn = NEXT_INSN (insn)) - { - if (computed_jump_p (insn)) - return 1; - - if (insn == basic_block_end[b]) - break; - } - } - /* All the tests passed. Consider the cfg well structured. */ return 0; } |