From 839844befa03c6eedadc1e045980c8505e68b830 Mon Sep 17 00:00:00 2001 From: "J\"orn Rennecke" Date: Fri, 23 May 2003 20:08:22 +0000 Subject: [PATCH] cse.c (count_reg_usage): When processing an INSNs REG_EQUAL note containing an EXPR_LIST... * cse.c (count_reg_usage): When processing an INSNs REG_EQUAL note containing an EXPR_LIST, process all the arguments. From-SVN: r67132 --- gcc/ChangeLog | 5 +++++ gcc/cse.c | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b3fe1bd6b23..b09cb306226 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-05-23 J"orn Rennecke + + * cse.c (count_reg_usage): When processing an INSNs REG_EQUAL + note containing an EXPR_LIST, process all the arguments. + Fri May 23 21:19:31 CEST 2003 Jan Hubicka Andreas Jaeger diff --git a/gcc/cse.c b/gcc/cse.c index 01c583cae07..671fd068f96 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -7512,7 +7512,21 @@ count_reg_usage (x, counts, dest, incr) note = find_reg_equal_equiv_note (x); if (note) - count_reg_usage (XEXP (note, 0), counts, NULL_RTX, incr); + { + rtx eqv = XEXP (note, 0); + + if (GET_CODE (eqv) == EXPR_LIST) + /* This REG_EQUAL note describes the result of a function call. + Process all the arguments. */ + do + { + count_reg_usage (XEXP (eqv, 0), counts, NULL_RTX, incr); + eqv = XEXP (eqv, 1); + } + while (eqv && GET_CODE (eqv) == EXPR_LIST); + else + count_reg_usage (eqv, counts, NULL_RTX, incr); + } return; case EXPR_LIST: -- 2.30.2