Commit e803a64b by Richard Henderson Committed by Richard Henderson

rtl.h (NOTE_INSN_LOOP_END_TOP_COND): New.

        * rtl.h (NOTE_INSN_LOOP_END_TOP_COND): New.
        * rtl.c (note_insn_name): Update.
        * emit-rtl.c (remove_unnecessary_notes): Kill it.
        * stmt.c (expand_end_loop): Kill jump opt code.  Use LOOP_END_TOP_COND
        to perform loop rotation.
        (expand_exit_loop_top_cond): New.
        * tree.h (expand_exit_loop_top_cond): Declare it.
        * c-semantics.c (genrtl_while_stmt): Use it.
        (genrtl_for_stmt): Likewise.

        * ada/trans.c (tree_transform) [N_Loop_Statement]: Use
        expand_exit_loop_top_cond.

        * f/ste.c (ffeste_begin_iterdo_): Use expand_exit_loop_top_cond.
        (ffeste_R819B): Likewise.

From-SVN: r49364
parent 5867245e
2002-01-30 Richard Henderson <rth@redhat.com>
* rtl.h (NOTE_INSN_LOOP_END_TOP_COND): New.
* rtl.c (note_insn_name): Update.
* emit-rtl.c (remove_unnecessary_notes): Kill it.
* stmt.c (expand_end_loop): Kill jump opt code. Use LOOP_END_TOP_COND
to perform loop rotation.
(expand_exit_loop_top_cond): New.
* tree.h (expand_exit_loop_top_cond): Declare it.
* c-semantics.c (genrtl_while_stmt): Use it.
(genrtl_for_stmt): Likewise.
2002-01-30 Alexandre Oliva <aoliva@redhat.com>
* config/mips/mips.h (PARM_BOUNDARY): Guarantee alignment of
......
2001-01-30 Richard Henderson <rth@redhat.com>
* trans.c (tree_transform) [N_Loop_Statement]: Use
expand_exit_loop_top_cond.
2001-12-23 Richard Henderson <rth@redhat.com>
* utils.c (end_subprog_body): Push GC context around
......
......@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
* $Revision$
* $Revision: 1.10 $
* *
* Copyright (C) 1992-2001, Free Software Foundation, Inc. *
* *
......@@ -2350,7 +2350,7 @@ tree_transform (gnat_node)
if (Present (gnat_top_condition))
gnu_top_condition = gnat_to_gnu (gnat_top_condition);
expand_exit_loop_if_false (0, gnu_top_condition);
expand_exit_loop_top_cond (0, gnu_top_condition);
/* Make the loop body into its own block, so any allocated
storage will be released every iteration. This is needed
......
......@@ -427,7 +427,7 @@ genrtl_while_stmt (t)
cond = expand_cond (WHILE_COND (t));
emit_line_note (input_filename, lineno);
expand_exit_loop_if_false (0, cond);
expand_exit_loop_top_cond (0, cond);
genrtl_do_pushlevel ();
expand_stmt (WHILE_BODY (t));
......@@ -529,7 +529,7 @@ genrtl_for_stmt (t)
/* Expand the condition. */
emit_line_note (input_filename, lineno);
if (cond)
expand_exit_loop_if_false (0, cond);
expand_exit_loop_top_cond (0, cond);
/* Expand the body. */
genrtl_do_pushlevel ();
......
......@@ -3562,6 +3562,7 @@ remove_unnecessary_notes ()
switch (NOTE_LINE_NUMBER (insn))
{
case NOTE_INSN_DELETED:
case NOTE_INSN_LOOP_END_TOP_COND:
remove_insn (insn);
break;
......
2002-01-30 Richard Henderson <rth@redhat.com>
* ste.c (ffeste_begin_iterdo_): Use expand_exit_loop_top_cond.
(ffeste_R819B): Likewise.
2002-01-30 Toon Moene <toon@moene.indiv.nluug.nl>
* intrin.c (upcasecmp_): New function.
......
......@@ -706,7 +706,7 @@ ffeste_begin_iterdo_ (ffestw block, tree *xtvar, tree *xtincr,
convert (TREE_TYPE (niters),
ffecom_integer_zero_node)));
expand_exit_loop_if_false (0, expr);
expand_exit_loop_top_cond (0, expr);
}
if (block)
......@@ -2816,7 +2816,7 @@ ffeste_R819B (ffestw block, ffelab label UNUSED, ffebld expr)
ffeste_end_stmt_ ();
ffestw_set_do_hook (block, loop);
expand_exit_loop_if_false (0, result);
expand_exit_loop_top_cond (0, result);
}
else
ffestw_set_do_hook (block, expand_start_loop (1));
......
......@@ -263,7 +263,7 @@ const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS] =
"NOTE_INSN_BLOCK_BEG", "NOTE_INSN_BLOCK_END",
"NOTE_INSN_LOOP_BEG", "NOTE_INSN_LOOP_END",
"NOTE_INSN_LOOP_CONT", "NOTE_INSN_LOOP_VTOP",
"NOTE_INSN_FUNCTION_END",
"NOTE_INSN_LOOP_END_TOP_COND", "NOTE_INSN_FUNCTION_END",
"NOTE_INSN_PROLOGUE_END", "NOTE_INSN_EPILOGUE_BEG",
"NOTE_INSN_DELETED_LABEL", "NOTE_INSN_FUNCTION_BEG",
"NOTE_INSN_EH_REGION_BEG", "NOTE_INSN_EH_REGION_END",
......
......@@ -682,6 +682,12 @@ enum insn_note
/* Generated at the start of a duplicated exit test. */
NOTE_INSN_LOOP_VTOP,
/* Generated at the end of a conditional at the top of the loop.
This is used to perform a lame form of loop rotation in lieu
of actually understanding the loop structure. The note is
discarded after rotation is complete. */
NOTE_INSN_LOOP_END_TOP_COND,
/* This kind of note is generated at the end of the function body,
just before the return insn or return label. In an optimizing
compilation it is deleted by the first jump optimization, after
......
......@@ -2751,7 +2751,9 @@ extern void expand_end_null_loop PARAMS ((void));
extern int expand_continue_loop PARAMS ((struct nesting *));
extern int expand_exit_loop PARAMS ((struct nesting *));
extern int expand_exit_loop_if_false PARAMS ((struct nesting *,
tree));
tree));
extern int expand_exit_loop_top_cond PARAMS ((struct nesting *,
tree));
extern int expand_exit_something PARAMS ((void));
extern void expand_return PARAMS ((tree));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment