summaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-24 15:44:45 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-24 15:44:45 +0000
commit5cc577b681b86036b19ec2f71cb399ac836e5b0c (patch)
treee186b987f46b4fb2c5b039a34787ffa2f09946d7 /gcc/rtlanal.c
parente766159cf97a40e114654c1bd612357360275807 (diff)
downloadgcc-5cc577b681b86036b19ec2f71cb399ac836e5b0c.tar.gz
* rtl.h (in_expr_list_p): New declaration.
* rtlanal.c (in_expr_list_p): New function. * cfgcleanup.c: Reformatting and minor code rearrangement. * cfglayout.c, cfgloop.c, cfgrtl.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48304 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index b6056de14a1..427e3fbe921 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1954,6 +1954,24 @@ remove_note (insn, note)
}
/* Search LISTP (an EXPR_LIST) for an entry whose first operand is NODE and
+ return 1 if it is found. A simple equality test is used to determine if
+ NODE matches. */
+
+int
+in_expr_list_p (listp, node)
+ rtx listp;
+ rtx node;
+{
+ rtx x;
+
+ for (x = listp; x; x = XEXP (x, 1))
+ if (node == XEXP (x, 0))
+ return 1;
+
+ return 0;
+}
+
+/* Search LISTP (an EXPR_LIST) for an entry whose first operand is NODE and
remove that entry from the list if it is found.
A simple equality test is used to determine if NODE matches. */