aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@superh.com>2003-05-23 20:08:22 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2003-05-23 21:08:22 +0100
commit839844befa03c6eedadc1e045980c8505e68b830 (patch)
tree4f92a85daf94c615e9e895e5f6c349013292c172 /gcc/cse.c
parent6c82ad2561090a9ba4011886a60d2c1423924302 (diff)
downloadgcc-839844befa03c6eedadc1e045980c8505e68b830.zip
gcc-839844befa03c6eedadc1e045980c8505e68b830.tar.gz
gcc-839844befa03c6eedadc1e045980c8505e68b830.tar.bz2
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
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 01c583c..671fd06 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: