summaryrefslogtreecommitdiff
path: root/gcc/dojump.c
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-17 07:27:16 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-17 07:27:16 +0000
commita1ad748385a81e37a0a381402fd07450c702f837 (patch)
tree0f8a615af173ede05125885d4bfc8d27ef332ff7 /gcc/dojump.c
parentacdfd3eb8e8bfd5b3ab500667994c2803ee1b389 (diff)
downloadgcc-a1ad748385a81e37a0a381402fd07450c702f837.tar.gz
2004-08-17 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in: Regenerate. * configure: Regenerate. * Makefile.def (bootstrap-stage): Rename extra_*_flags to stage_*_flags. * Makefile.tpl (configure-[+module+], all-[+module+]): Exit for bootstrapped modules if toplevel bootstrap is going. (GCC bootstrap): Generate per-stage targets for all bootstrapped modules. Adjust for changes in Makefile.def. Enable several rules even in non-bootstrap mode, just to avoid peppering the template with unnecessary "@if/@endif gcc-bootstrap" pairs. (stage-[+prev+]-bubble): Remove. * Makefile.def (Dependencies): Depend on all-build-bison, all-build-flex, all-build-byacc, all-build-texinfo, rather than the host variations. * Makefile.tpl (BUILD_DIR_PREFIX): Remove. Replace throughout with BUILD_SUBDIR. (BISON): Update for recent Bisons. (YACC): Fix typo. (cross): Depend on all-build. (all): Do not depend on all-build. (prebootstrap): Remove. (dep-kind): Accept separate prefixes for MODULE and ON variables. (Prebootstrap dependencies): Add them to the per-stage targets and to all-prebootstrap. * configure.in (build_configdirs): Always enable build_tools. (BUILD_DIR_PREFIX): Remove. * Makefile.def (gcc): Add target variable. (gdb, expect, guile, tk, tix): Replace with_x with extra_make_flags. * Makefile.tpl (Autogenerated `all-*' targets): Invoke $(TARGET-*) in the recursive `make', instead of hardwiring `all'. (Autogenerated TARGET-* variables): New. gcc/ChangeLog: 2004-08-17 Paolo Bonzini <bonzini@gnu.org> * configure.ac: Trust toplevel's notion of BISON/FLEX/MAKEINFO. No need to check if in a cross configuration. * configure: Regenerate. * calls.c (precompute_register_parameters): Inline preserve_subexpressions_p (). * expmed.c (expand_mult_const, emit_store_flag): Likewise. * optabs.c (expand_binop, expand_twoval_binop, prepare_cmp_insn): Likewise. * expr.c (get_subtarget): Likewise. * rtl.h (preserve_subexpressions_p): Remove. * stmt.c (preserve_subexpressions_p): Remove. * dojump.c (do_jump) <COND_EXPR, EQ_EXPR, NE_EXPR, TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, COMPOUND_EXPR>: Abort on gimplified cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86111 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dojump.c')
-rw-r--r--gcc/dojump.c127
1 files changed, 5 insertions, 122 deletions
diff --git a/gcc/dojump.c b/gcc/dojump.c
index 363d815251e..3877f79de73 100644
--- a/gcc/dojump.c
+++ b/gcc/dojump.c
@@ -208,19 +208,6 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label);
break;
-#if 0
- /* This is never less insns than evaluating the PLUS_EXPR followed by
- a test and can be longer if the test is eliminated. */
- case PLUS_EXPR:
- /* Reduce to minus. */
- exp = build2 (MINUS_EXPR, TREE_TYPE (exp),
- TREE_OPERAND (exp, 0),
- fold (build1 (NEGATE_EXPR,
- TREE_TYPE (TREE_OPERAND (exp, 1)),
- TREE_OPERAND (exp, 1))));
- /* Process as MINUS. */
-#endif
-
case MINUS_EXPR:
/* Nonzero iff operands of minus differ. */
do_compare_and_jump (build2 (NE_EXPR, TREE_TYPE (exp),
@@ -281,28 +268,11 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
break;
case TRUTH_ANDIF_EXPR:
- if (if_false_label == 0)
- if_false_label = drop_through_label = gen_label_rtx ();
- do_jump (TREE_OPERAND (exp, 0), if_false_label, NULL_RTX);
- do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label);
- break;
-
case TRUTH_ORIF_EXPR:
- if (if_true_label == 0)
- if_true_label = drop_through_label = gen_label_rtx ();
- do_jump (TREE_OPERAND (exp, 0), NULL_RTX, if_true_label);
- do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label);
- break;
-
case COMPOUND_EXPR:
- push_temp_slots ();
- expand_expr (TREE_OPERAND (exp, 0), const0_rtx, VOIDmode, 0);
- preserve_temp_slots (NULL_RTX);
- free_temp_slots ();
- pop_temp_slots ();
- do_pending_stack_adjust ();
- do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label);
- break;
+ case COND_EXPR:
+ /* Lowered by gimplify.c. */
+ abort ();
case COMPONENT_REF:
case BIT_FIELD_REF:
@@ -334,70 +304,15 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
goto normal;
}
- case COND_EXPR:
- /* Do (a ? 1 : 0) and (a ? 0 : 1) as special cases. */
- if (integer_onep (TREE_OPERAND (exp, 1))
- && integer_zerop (TREE_OPERAND (exp, 2)))
- do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label);
-
- else if (integer_zerop (TREE_OPERAND (exp, 1))
- && integer_onep (TREE_OPERAND (exp, 2)))
- do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label);
-
- else
- {
- rtx label1 = gen_label_rtx ();
- drop_through_label = gen_label_rtx ();
-
- do_jump (TREE_OPERAND (exp, 0), label1, NULL_RTX);
-
- /* Now the THEN-expression. */
- do_jump (TREE_OPERAND (exp, 1),
- if_false_label ? if_false_label : drop_through_label,
- if_true_label ? if_true_label : drop_through_label);
- /* In case the do_jump just above never jumps. */
- do_pending_stack_adjust ();
- emit_label (label1);
-
- /* Now the ELSE-expression. */
- do_jump (TREE_OPERAND (exp, 2),
- if_false_label ? if_false_label : drop_through_label,
- if_true_label ? if_true_label : drop_through_label);
- }
- break;
-
case EQ_EXPR:
{
tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_FLOAT
|| GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_INT)
- {
- tree exp0 = save_expr (TREE_OPERAND (exp, 0));
- tree exp1 = save_expr (TREE_OPERAND (exp, 1));
- do_jump
- (fold
- (build2 (TRUTH_ANDIF_EXPR, TREE_TYPE (exp),
- fold (build2 (EQ_EXPR, TREE_TYPE (exp),
- fold (build1 (REALPART_EXPR,
- TREE_TYPE (inner_type),
- exp0)),
- fold (build1 (REALPART_EXPR,
- TREE_TYPE (inner_type),
- exp1)))),
- fold (build2 (EQ_EXPR, TREE_TYPE (exp),
- fold (build1 (IMAGPART_EXPR,
- TREE_TYPE (inner_type),
- exp0)),
- fold (build1 (IMAGPART_EXPR,
- TREE_TYPE (inner_type),
- exp1)))))),
- if_false_label, if_true_label);
- }
-
+ abort ();
else if (integer_zerop (TREE_OPERAND (exp, 1)))
do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label);
-
else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT
&& !can_compare_p (EQ, TYPE_MODE (inner_type), ccp_jump))
do_jump_by_parts_equality (exp, if_false_label, if_true_label);
@@ -412,32 +327,9 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_FLOAT
|| GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_INT)
- {
- tree exp0 = save_expr (TREE_OPERAND (exp, 0));
- tree exp1 = save_expr (TREE_OPERAND (exp, 1));
- do_jump
- (fold
- (build2 (TRUTH_ORIF_EXPR, TREE_TYPE (exp),
- fold (build2 (NE_EXPR, TREE_TYPE (exp),
- fold (build1 (REALPART_EXPR,
- TREE_TYPE (inner_type),
- exp0)),
- fold (build1 (REALPART_EXPR,
- TREE_TYPE (inner_type),
- exp1)))),
- fold (build2 (NE_EXPR, TREE_TYPE (exp),
- fold (build1 (IMAGPART_EXPR,
- TREE_TYPE (inner_type),
- exp0)),
- fold (build1 (IMAGPART_EXPR,
- TREE_TYPE (inner_type),
- exp1)))))),
- if_false_label, if_true_label);
- }
-
+ abort ();
else if (integer_zerop (TREE_OPERAND (exp, 1)))
do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label);
-
else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT
&& !can_compare_p (NE, TYPE_MODE (inner_type), ccp_jump))
do_jump_by_parts_equality (exp, if_true_label, if_false_label);
@@ -602,15 +494,6 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
default:
normal:
temp = expand_expr (exp, NULL_RTX, VOIDmode, 0);
-#if 0
- /* This is not needed any more and causes poor code since it causes
- comparisons and tests from non-SI objects to have different code
- sequences. */
- /* Copy to register to avoid generating bad insns by cse
- from (set (mem ...) (arithop)) (set (cc0) (mem ...)). */
- if (!cse_not_expected && MEM_P (temp))
- temp = copy_to_reg (temp);
-#endif
do_pending_stack_adjust ();
if (GET_CODE (temp) == CONST_INT