summaryrefslogtreecommitdiff
path: root/gcc/lcm.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-21 15:47:33 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-21 15:47:33 +0000
commita53ff4c19b10f7e985c30814a913a11de1e553e6 (patch)
treed321c52c21dedb7b851a7e57b5ea7c445d44db56 /gcc/lcm.c
parentf0cf03cb877c7e3dfe2903f3e4720b4d44d1dc34 (diff)
downloadgcc-a53ff4c19b10f7e985c30814a913a11de1e553e6.tar.gz
* alias.c (true_dependence): Remove 'abort' from comments. Use
gcc_assert and gcc_unreachable as appropriate. (canon_true_dependence): Likewise. * bb-reorder.c (connect_traces): Likewise. * c-common.c (c_add_case_label): Likewise. * c-decl.c (finish_function): Likewise. * caller-save.c (insert_restore, insert_save): Likewise. * cfg.c (update_bb_profile_for_threading): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * cfgexpand.c (add_reg_br_prob_note): Likewise. * cfgrtl.c (rtl_redirect_edge_and_branch_force, rtl_split_edge, cfg_layout_merge_blocks): Likewise. * ifcvt.c (cond_exec_process_insns, merge_if_block, find_if_block): Likewise. * integrate.c (allocate_initial_values): Likewise. * jump.c (reverse_condition, reverse_condition_maybe_unordered, swap_condition, unsigned_condition, signed_condition, mark_jump_label, invert_jump_1, rtx_renumbered_equal_p, reg_or_subregno): Likewise. * lambda-code.c (lambda_compute_auxillary_space, lambda_transform_legal_p): Likewise. * lambda-mat.c (lambda_matrix_inverse_hard): Likewise. * langhooks.c (lhd_set_decl_assembler_name, lhd_type_promotes_to, lhd_incomplete_type_error, lhd_expand_expr, lhd_types_compatible_p, lhd_tree_size): Likewise. * lcm.c (create_pre_exit, optimize_mode_switching): Likewise. * local-alloc.c (update_equiv_regs): Likewise. * loop-unroll.c (peel_loop_completely unroll_loop_constant_iterations, unroll_loop_runtime_iterations, peel_loop_simple, unroll_loop_stupid, analyze_iv_to_split_insn): Likewise. * loop.c (gen_prefetch, find_and_verify_loops, basic_induction_var): Likewise. * modulo-sched.c (normalize_sched_times, check_nodes_order): Likewise. * value-prof.c (tree_find_values_to_profile): Likewise. * varasm.c (named_section, default_assemble_integer, decode_addr_const): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98508 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lcm.c')
-rw-r--r--gcc/lcm.c60
1 files changed, 33 insertions, 27 deletions
diff --git a/gcc/lcm.c b/gcc/lcm.c
index 4f2f4062ce6..d62bbb01a12 100644
--- a/gcc/lcm.c
+++ b/gcc/lcm.c
@@ -1101,23 +1101,27 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
last_insn = return_copy;
}
while (nregs);
+
/* If we didn't see a full return value copy, verify that there
is a plausible reason for this. If some, but not all of the
return register is likely spilled, we can expect that there
is a copy for the likely spilled part. */
- if (nregs
- && ! forced_late_switch
- && ! short_block
- && CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (ret_start))
- && nregs == hard_regno_nregs[ret_start][GET_MODE (ret_reg)]
- /* For multi-hard-register floating point values,
- sometimes the likely-spilled part is ordinarily copied
- first, then the other part is set with an arithmetic
- operation. This doesn't actually cause reload failures,
- so let it pass. */
- && (GET_MODE_CLASS (GET_MODE (ret_reg)) == MODE_INT
- || nregs == 1))
- abort ();
+ gcc_assert (!nregs
+ || forced_late_switch
+ || short_block
+ || !(CLASS_LIKELY_SPILLED_P
+ (REGNO_REG_CLASS (ret_start)))
+ || (nregs
+ != hard_regno_nregs[ret_start][GET_MODE (ret_reg)])
+ /* For multi-hard-register floating point
+ values, sometimes the likely-spilled part
+ is ordinarily copied first, then the other
+ part is set with an arithmetic operation.
+ This doesn't actually cause reload
+ failures, so let it pass. */
+ || (GET_MODE_CLASS (GET_MODE (ret_reg)) != MODE_INT
+ && nregs != 1));
+
if (INSN_P (last_insn))
{
before_return_copy
@@ -1370,21 +1374,23 @@ optimize_mode_switching (FILE *file)
emited = true;
if (JUMP_P (BB_END (src_bb)))
emit_insn_before (mode_set, BB_END (src_bb));
- /* It doesn't make sense to switch to normal mode
- after a CALL_INSN, so we're going to abort if we
- find one. The cases in which a CALL_INSN may
- have an abnormal edge are sibcalls and EH edges.
- In the case of sibcalls, the dest basic-block is
- the EXIT_BLOCK, that runs in normal mode; it is
- assumed that a sibcall insn requires normal mode
- itself, so no mode switch would be required after
- the call (it wouldn't make sense, anyway). In
- the case of EH edges, EH entry points also start
- in normal mode, so a similar reasoning applies. */
- else if (NONJUMP_INSN_P (BB_END (src_bb)))
- emit_insn_after (mode_set, BB_END (src_bb));
else
- abort ();
+ {
+ /* It doesn't make sense to switch to normal
+ mode after a CALL_INSN. The cases in which a
+ CALL_INSN may have an abnormal edge are
+ sibcalls and EH edges. In the case of
+ sibcalls, the dest basic-block is the
+ EXIT_BLOCK, that runs in normal mode; it is
+ assumed that a sibcall insn requires normal
+ mode itself, so no mode switch would be
+ required after the call (it wouldn't make
+ sense, anyway). In the case of EH edges, EH
+ entry points also start in normal mode, so a
+ similar reasoning applies. */
+ gcc_assert (NONJUMP_INSN_P (BB_END (src_bb)));
+ emit_insn_after (mode_set, BB_END (src_bb));
+ }
bb_info[j][src_bb->index].computing = mode;
RESET_BIT (transp[src_bb->index], j);
}