aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-04-12 02:18:55 +0000
committerJeff Law <law@gcc.gnu.org>1999-04-11 20:18:55 -0600
commit55a98783c87b42efddbc8a1dcda79fa62888e982 (patch)
tree4730eb8514a569674bc3d9d7886860ad0b6bb297 /gcc/rtlanal.c
parent21b2cd732182b457962d0f248662c5d894e147ca (diff)
downloadgcc-55a98783c87b42efddbc8a1dcda79fa62888e982.zip
gcc-55a98783c87b42efddbc8a1dcda79fa62888e982.tar.gz
gcc-55a98783c87b42efddbc8a1dcda79fa62888e982.tar.bz2
flow.c (flow_delete_insn): If we delete a CODE_LABEL...
* flow.c (flow_delete_insn): If we delete a CODE_LABEL, also remove it from the nonlocal_goto_handler_labels list. * jump.c (delete_insn): Likewise. (jump_optimize_1): Also recompute LABEL_NUSES when we are just marking labels. * rtl.h (remove_node_from_expr_list): Declare. * rtlanal.c (remove_node_from_expr_list): New function. From-SVN: r26361
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index d39071b..fb4f87c 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1529,6 +1529,36 @@ remove_note (insn, note)
abort ();
}
+
+/* Search LISTP (an EXPR_LIST) for NODE and remove NODE from the list
+ if it is found.
+
+ A simple equality test is used to determine if NODE is on the
+ EXPR_LIST. */
+
+void
+remove_node_from_expr_list (node, listp)
+ rtx node;
+ rtx *listp;
+{
+ rtx temp = *listp;
+ rtx prev = NULL_RTX;
+
+ while (temp)
+ {
+ if (node == XEXP (temp, 0))
+ {
+ /* Splice the node out of the list. */
+ if (prev)
+ XEXP (prev, 1) = XEXP (temp, 1);
+ else
+ *listp = XEXP (temp, 1);
+
+ return;
+ }
+ temp = XEXP (temp, 1);
+ }
+}
/* Nonzero if X contains any volatile instructions. These are instructions
which may cause unpredictable machine state instructions, and thus no