summaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-04 21:31:43 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-04 21:31:43 +0000
commitadee86a00b4d598b6499b4c64ca73a7b4447587a (patch)
treec75dac8af5f667f1bb5695a19d09e79c5e0d96a7 /gcc/reload.c
parent0fe680424fb94569ab446264f5280c9ba859dabd (diff)
downloadgcc-adee86a00b4d598b6499b4c64ca73a7b4447587a.tar.gz
* reload.c (find_reloads): Reorganize if seqeunce to switch.
* cfgrtl.c (rtl_redirect_edge_and_branch): Set the source BB as dirty. (cfglayout_redirect_edge_and_branch): Set the source BB as dirty. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78936 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c113
1 files changed, 61 insertions, 52 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index d3cdaa844a7..f1682f73aee 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -2610,62 +2610,71 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
while ((c = *p))
{
p += CONSTRAINT_LEN (c, p);
- if (c == '=')
- modified[i] = RELOAD_WRITE;
- else if (c == '+')
- modified[i] = RELOAD_READ_WRITE;
- else if (c == '%')
+ switch (c)
{
- /* The last operand should not be marked commutative. */
- if (i == noperands - 1)
- abort ();
-
- /* We currently only support one commutative pair of
- operands. Some existing asm code currently uses more
- than one pair. Previously, that would usually work,
- but sometimes it would crash the compiler. We
- continue supporting that case as well as we can by
- silently ignoring all but the first pair. In the
- future we may handle it correctly. */
- if (commutative < 0)
- commutative = i;
- else if (!this_insn_is_asm)
- abort ();
- }
- else if (ISDIGIT (c))
- {
- c = strtoul (p - 1, &p, 10);
+ case '=':
+ modified[i] = RELOAD_WRITE;
+ break;
+ case '+':
+ modified[i] = RELOAD_READ_WRITE;
+ break;
+ case '%':
+ {
+ /* The last operand should not be marked commutative. */
+ if (i == noperands - 1)
+ abort ();
- operands_match[c][i]
- = operands_match_p (recog_data.operand[c],
- recog_data.operand[i]);
+ /* We currently only support one commutative pair of
+ operands. Some existing asm code currently uses more
+ than one pair. Previously, that would usually work,
+ but sometimes it would crash the compiler. We
+ continue supporting that case as well as we can by
+ silently ignoring all but the first pair. In the
+ future we may handle it correctly. */
+ if (commutative < 0)
+ commutative = i;
+ else if (!this_insn_is_asm)
+ abort ();
+ }
+ break;
+ /* Use of ISDIGIT is tempting here, but it may get expensive because
+ of locale support we don't want. */
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ c = strtoul (p - 1, &p, 10);
- /* An operand may not match itself. */
- if (c == i)
- abort ();
+ operands_match[c][i]
+ = operands_match_p (recog_data.operand[c],
+ recog_data.operand[i]);
- /* If C can be commuted with C+1, and C might need to match I,
- then C+1 might also need to match I. */
- if (commutative >= 0)
- {
- if (c == commutative || c == commutative + 1)
- {
- int other = c + (c == commutative ? 1 : -1);
- operands_match[other][i]
- = operands_match_p (recog_data.operand[other],
- recog_data.operand[i]);
- }
- if (i == commutative || i == commutative + 1)
- {
- int other = i + (i == commutative ? 1 : -1);
- operands_match[c][other]
- = operands_match_p (recog_data.operand[c],
- recog_data.operand[other]);
- }
- /* Note that C is supposed to be less than I.
- No need to consider altering both C and I because in
- that case we would alter one into the other. */
- }
+ /* An operand may not match itself. */
+ if (c == i)
+ abort ();
+
+ /* If C can be commuted with C+1, and C might need to match I,
+ then C+1 might also need to match I. */
+ if (commutative >= 0)
+ {
+ if (c == commutative || c == commutative + 1)
+ {
+ int other = c + (c == commutative ? 1 : -1);
+ operands_match[other][i]
+ = operands_match_p (recog_data.operand[other],
+ recog_data.operand[i]);
+ }
+ if (i == commutative || i == commutative + 1)
+ {
+ int other = i + (i == commutative ? 1 : -1);
+ operands_match[c][other]
+ = operands_match_p (recog_data.operand[c],
+ recog_data.operand[other]);
+ }
+ /* Note that C is supposed to be less than I.
+ No need to consider altering both C and I because in
+ that case we would alter one into the other. */
+ }
+ }
}
}
}