This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Remove alt_end_label field from struct nesting


This patch removes the alt_end_label field from the struct nesting
structure in stmt.c.  This field is currently only set and never
used.  Removing this cleans up the "expand_exit_loop_if_false"
logic a bit.

This patch has been tested with a complete "make bootstrap" and
"make -k check", all languages except Ada and treelang, on
i686-pc-linux-gnu with no new regressions.


Ok for the gcc-3_4-basic-improvements-branch?


2002-09-12  Roger Sayle  <roger@eyesopen.com>

	* stmt.c (struct nexting): Remove unused alt_end_label field.
	(expand_start_loop): Delete initialization of alt_end_label.
	(expand_start_null_loop): Likewise.
	(expand_exit_loop_if_false): Delete updating of alt_end_label.


Index: stmt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stmt.c,v
retrieving revision 1.269
diff -c -3 -p -r1.269 stmt.c
*** stmt.c	14 Aug 2002 10:04:48 -0000	1.269
--- stmt.c	12 Sep 2002 16:54:45 -0000
*************** struct nesting GTY(())
*** 166,174 ****
  	  rtx start_label;
  	  /* Label at the end of the whole construct.  */
  	  rtx end_label;
- 	  /* Label before a jump that branches to the end of the whole
- 	     construct.  This is where destructors go if any.  */
- 	  rtx alt_end_label;
  	  /* Label for `continue' statement to jump to;
  	     this is in front of the stepper of the loop.  */
  	  rtx continue_label;
--- 166,171 ----
*************** expand_start_loop (exit_flag)
*** 2422,2428 ****
    thisloop->depth = ++nesting_depth;
    thisloop->data.loop.start_label = gen_label_rtx ();
    thisloop->data.loop.end_label = gen_label_rtx ();
-   thisloop->data.loop.alt_end_label = 0;
    thisloop->data.loop.continue_label = thisloop->data.loop.start_label;
    thisloop->exit_label = exit_flag ? thisloop->data.loop.end_label : 0;
    loop_stack = thisloop;
--- 2419,2424 ----
*************** expand_start_null_loop ()
*** 2464,2470 ****
    thisloop->depth = ++nesting_depth;
    thisloop->data.loop.start_label = emit_note (NULL, NOTE_INSN_DELETED);
    thisloop->data.loop.end_label = gen_label_rtx ();
-   thisloop->data.loop.alt_end_label = NULL_RTX;
    thisloop->data.loop.continue_label = thisloop->data.loop.end_label;
    thisloop->exit_label = thisloop->data.loop.end_label;
    loop_stack = thisloop;
--- 2460,2465 ----
*************** expand_exit_loop_if_false (whichloop, co
*** 2700,2706 ****
       tree cond;
  {
    rtx label = gen_label_rtx ();
-   rtx last_insn;
    clear_last_expr ();

    if (whichloop == 0)
--- 2695,2700 ----
*************** expand_exit_loop_if_false (whichloop, co
*** 2712,2720 ****
       necessary, they go before the unconditional branch.  */

    do_jump (cond, NULL_RTX, label);
-   last_insn = get_last_insn ();
-   if (GET_CODE (last_insn) == CODE_LABEL)
-     whichloop->data.loop.alt_end_label = last_insn;
    expand_goto_internal (NULL_TREE, whichloop->data.loop.end_label,
  			NULL_RTX);
    emit_label (label);
--- 2706,2711 ----


Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]