aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-10-04 06:08:16 +0000
committerJeff Law <law@gcc.gnu.org>1999-10-04 00:08:16 -0600
commit910eabe5013f0feaed1a493a42f3cf577cb90769 (patch)
treeca6da6fdbd99fa188291c05a82062d9f8beeca25
parentaedf9aa78cd6a5c8e792a3b5859d44decf8b8885 (diff)
downloadgcc-910eabe5013f0feaed1a493a42f3cf577cb90769.zip
gcc-910eabe5013f0feaed1a493a42f3cf577cb90769.tar.gz
gcc-910eabe5013f0feaed1a493a42f3cf577cb90769.tar.bz2
genattrtab.c (simplify_cond): Make TESTS an array of rtxs, instead of rtunions.
* genattrtab.c (simplify_cond): Make TESTS an array of rtxs, instead of rtunions. From-SVN: r29792
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/genattrtab.c30
2 files changed, 18 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 46da2ad..c6162b0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
Sun Oct 3 14:14:16 1999 Jeffrey A Law (law@cygnus.com)
+ * genattrtab.c (simplify_cond): Make TESTS an array of rtxs, instead
+ of rtunions.
+
* mbchar.h: Add missing #endif.
* t-fr30 (LIB2FUNCS_EXTRA): Remove definition.
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index f6fee5cb..815f3f1 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -2531,14 +2531,14 @@ simplify_cond (exp, insn_code, insn_index)
rtx defval = XEXP (exp, 1);
rtx new_defval = XEXP (exp, 1);
int len = XVECLEN (exp, 0);
- rtunion *tests = (rtunion *) alloca (len * sizeof (rtunion));
+ rtx *tests = (rtx *) alloca (len * sizeof (rtx));
int allsame = 1;
char *first_spacer;
/* This lets us free all storage allocated below, if appropriate. */
first_spacer = (char *) obstack_finish (rtl_obstack);
- bcopy ((char *) XVEC (exp, 0)->elem, (char *) tests, len * sizeof (rtunion));
+ bcopy ((char *) XVEC (exp, 0)->elem, (char *) tests, len * sizeof (rtx));
/* See if default value needs simplification. */
if (GET_CODE (defval) == COND)
@@ -2551,10 +2551,10 @@ simplify_cond (exp, insn_code, insn_index)
rtx newtest, newval;
/* Simplify this test. */
- newtest = SIMPLIFY_TEST_EXP (tests[i].rtx, insn_code, insn_index);
- tests[i].rtx = newtest;
+ newtest = SIMPLIFY_TEST_EXP (tests[i], insn_code, insn_index);
+ tests[i] = newtest;
- newval = tests[i + 1].rtx;
+ newval = tests[i + 1];
/* See if this value may need simplification. */
if (GET_CODE (newval) == COND)
newval = simplify_cond (newval, insn_code, insn_index);
@@ -2565,7 +2565,7 @@ simplify_cond (exp, insn_code, insn_index)
/* If test is true, make this value the default
and discard this + any following tests. */
len = i;
- defval = tests[i + 1].rtx;
+ defval = tests[i + 1];
new_defval = newval;
}
@@ -2573,33 +2573,33 @@ simplify_cond (exp, insn_code, insn_index)
{
/* If test is false, discard it and its value. */
for (j = i; j < len - 2; j++)
- tests[j].rtx = tests[j + 2].rtx;
+ tests[j] = tests[j + 2];
len -= 2;
}
- else if (i > 0 && attr_equal_p (newval, tests[i - 1].rtx))
+ else if (i > 0 && attr_equal_p (newval, tests[i - 1]))
{
/* If this value and the value for the prev test are the same,
merge the tests. */
- tests[i - 2].rtx
- = insert_right_side (IOR, tests[i - 2].rtx, newtest,
+ tests[i - 2]
+ = insert_right_side (IOR, tests[i - 2], newtest,
insn_code, insn_index);
/* Delete this test/value. */
for (j = i; j < len - 2; j++)
- tests[j].rtx = tests[j + 2].rtx;
+ tests[j] = tests[j + 2];
len -= 2;
}
else
- tests[i + 1].rtx = newval;
+ tests[i + 1] = newval;
}
/* If the last test in a COND has the same value
as the default value, that test isn't needed. */
- while (len > 0 && attr_equal_p (tests[len - 1].rtx, new_defval))
+ while (len > 0 && attr_equal_p (tests[len - 1], new_defval))
len -= 2;
/* See if we changed anything. */
@@ -2607,7 +2607,7 @@ simplify_cond (exp, insn_code, insn_index)
allsame = 0;
else
for (i = 0; i < len; i++)
- if (! attr_equal_p (tests[i].rtx, XVECEXP (exp, 0, i)))
+ if (! attr_equal_p (tests[i], XVECEXP (exp, 0, i)))
{
allsame = 0;
break;
@@ -2633,7 +2633,7 @@ simplify_cond (exp, insn_code, insn_index)
XVEC (newexp, 0) = rtvec_alloc (len);
bcopy ((char *) tests, (char *) XVEC (newexp, 0)->elem,
- len * sizeof (rtunion));
+ len * sizeof (rtx));
XEXP (newexp, 1) = new_defval;
return newexp;
}