[RFA:] Split REG_LABEL into REG_LABEL_TARGET and REG_LABEL_OPERAND

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Mon Jan 30 22:18:00 GMT 2006


> Date: Mon, 30 Jan 2006 21:31:10 +0100
> From: Hans-Peter Nilsson <hp@axis.com>

> An earlier version with equivalent function but with the code in
> propagate_block_delete_insn arranged a little differently (the if-body
> split out into a helper function because I initially thought I'd need to
> refer to it twice and then forgot to change it back) and with an extra
> assert for absence of REG_LABEL_OPERAND notes on insns where a case-table
> was deleted (instead of just ignoring them), was also bootstrapped on
> x86_64-unknown-linux-gnu (FC4) and powerpc-unknown-linux-gnu (FC4).

... and *that* was the one I actually sent - only the ChangeLog
was updated.  Gah!  :-(  Here's the updated flow.c part; the
other patch parts are the same.

Index: flow.c
===================================================================
--- flow.c	(revision 110246)
+++ flow.c	(working copy)
@@ -1600,7 +1600,7 @@ allocate_reg_life_data (void)
 static void
 propagate_block_delete_insn (rtx insn)
 {
-  rtx inote = find_reg_note (insn, REG_LABEL, NULL_RTX);
+  rtx inote = find_reg_note (insn, REG_LABEL_TARGET, NULL_RTX);
 
   /* If the insn referred to a label, and that label was attached to
      an ADDR_VEC, it's safe to delete the ADDR_VEC.  In fact, it's
@@ -1639,6 +1639,9 @@ propagate_block_delete_insn (rtx insn)
 	}
     }
 
+  /* ADDR_VECs must be referred to as targets, not operands, so we
+     don't check REG_LABEL_OPERAND notes.  */
+
   delete_insn_and_edges (insn);
   ndead++;
 }


brgds, H-P



More information about the Gcc-patches mailing list