diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2015-01-15 20:26:19 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2015-01-15 20:26:19 +0000 |
commit | d1457701461d5a49ca6b5d8a6d1c83a37a6dc771 (patch) | |
tree | 8ad53dce7dd0dcd0dfba90387bdd8075e7e631b3 | |
parent | 41dbbb3789850dfea98dd8984f69806284f87b6e (diff) | |
download | gcc-d1457701461d5a49ca6b5d8a6d1c83a37a6dc771.zip gcc-d1457701461d5a49ca6b5d8a6d1c83a37a6dc771.tar.gz gcc-d1457701461d5a49ca6b5d8a6d1c83a37a6dc771.tar.bz2 |
re PR rtl-optimization/64110 (ICE: Max. number of generated reload insns per insn is achieved (90))
2015-01-15 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/64110
* stmt.c (parse_output_constraint): Process '^' and '$'.
(parse_input_constraint): Ditto.
* lra-constraints.c (process_alt_operands): Process the new
constraints.
* ira-costs.c (record_reg_classes): Process the new constraint
'^'.
* genoutput.c (indep_constraints): Add '^' and '$'.
* config/i386/sse.md (*vec_dup<mode>): Use '$' instead of '!'.
* doc/md.texi: Add description of the new constraints.
2015-01-15 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/64110
* gcc.target/i386/pr64110.c: Add scan-assembler.
From-SVN: r219683
-rw-r--r-- | gcc/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/config/i386/sse.md | 2 | ||||
-rw-r--r-- | gcc/doc/md.texi | 12 | ||||
-rw-r--r-- | gcc/genoutput.c | 2 | ||||
-rw-r--r-- | gcc/ira-costs.c | 4 | ||||
-rw-r--r-- | gcc/lra-constraints.c | 10 | ||||
-rw-r--r-- | gcc/stmt.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr64110.c | 1 |
9 files changed, 49 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a27df9..dace3d9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2015-01-15 Vladimir Makarov <vmakarov@redhat.com> + + PR rtl-optimization/64110 + * stmt.c (parse_output_constraint): Process '^' and '$'. + (parse_input_constraint): Ditto. + * lra-constraints.c (process_alt_operands): Process the new + constraints. + * ira-costs.c (record_reg_classes): Process the new constraint + '^'. + * genoutput.c (indep_constraints): Add '^' and '$'. + * config/i386/sse.md (*vec_dup<mode>): Use '$' instead of '!'. + * doc/md.texi: Add description of the new constraints. + 2015-01-15 Thomas Schwinge <thomas@codesourcery.com> Bernd Schmidt <bernds@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com> diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index cd4af4e..41de832 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -16713,7 +16713,7 @@ (define_insn "*vec_dup<mode>" [(set (match_operand:AVX2_VEC_DUP_MODE 0 "register_operand" "=x,x,x") (vec_duplicate:AVX2_VEC_DUP_MODE - (match_operand:<ssescalarmode> 1 "nonimmediate_operand" "m,x,!r")))] + (match_operand:<ssescalarmode> 1 "nonimmediate_operand" "m,x,$r")))] "TARGET_AVX2" "@ v<sseintprefix>broadcast<bcstscalarsuff>\t{%1, %0|%0, %1} diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 461ddf1..7bc7842 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -1507,6 +1507,18 @@ in it. Disparage severely the alternative that the @samp{!} appears in. This alternative can still be used if it fits without reloading, but if reloading is needed, some other alternative will be used. + +@cindex @samp{^} in constraint +@cindex caret +@item ^ +This constraint is analogous to @samp{?} but it disparages slightly +the alternative only if the operand with the @samp{?} needs a reload. + +@cindex @samp{$} in constraint +@cindex dollar sign +@item $ +This constraint is analogous to @samp{!} but it disparages severely +the alternative only if the operand with the @samp{$} needs a reload. @end table @ifset INTERNALS diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 3be3e13..2144b8e 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -209,7 +209,7 @@ struct constraint_data /* All machine-independent constraint characters (except digits) that are handled outside the define*_constraint mechanism. */ -static const char indep_constraints[] = ",=+%*?!#&g"; +static const char indep_constraints[] = ",=+%*?!^$#&g"; static struct constraint_data * constraints_by_letter_table[1 << CHAR_BIT]; diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index 0acb949..c19f258 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -778,6 +778,10 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, c = *++p; break; + case '^': + alt_cost += 2; + break; + case '?': alt_cost += 2; break; diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index cdfa944..f102fe5 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -1657,6 +1657,7 @@ process_alt_operands (int only_alternative) then REJECT is ignored, but otherwise it gets this much counted against it in addition to the reloading needed. */ int reject; + int op_reject; /* The number of elements in the following array. */ int early_clobbered_regs_num; /* Numbers of operands which are early clobber registers. */ @@ -1806,6 +1807,7 @@ process_alt_operands (int only_alternative) track. */ lra_assert (*p != 0 && *p != ','); + op_reject = 0; /* Scan this alternative's specs for this operand; set WIN if the operand fits any letter in this alternative. Otherwise, clear BADOP if this operand could fit some @@ -1828,6 +1830,13 @@ process_alt_operands (int only_alternative) early_clobber_p = true; break; + case '$': + op_reject += LRA_MAX_REJECT; + break; + case '^': + op_reject += LRA_LOSER_COST_FACTOR; + break; + case '#': /* Ignore rest of this alternative. */ c = '\0'; @@ -2114,6 +2123,7 @@ process_alt_operands (int only_alternative) int const_to_mem = 0; bool no_regs_p; + reject += op_reject; /* Never do output reload of stack pointer. It makes impossible to do elimination when SP is changed in RTL. */ @@ -307,6 +307,7 @@ parse_output_constraint (const char **constraint_p, int operand_num, break; case '?': case '!': case '*': case '&': case '#': + case '$': case '^': case 'E': case 'F': case 'G': case 'H': case 's': case 'i': case 'n': case 'I': case 'J': case 'K': case 'L': case 'M': @@ -397,6 +398,7 @@ parse_input_constraint (const char **constraint_p, int input_num, case '<': case '>': case '?': case '!': case '*': case '#': + case '$': case '^': case 'E': case 'F': case 'G': case 'H': case 's': case 'i': case 'n': case 'I': case 'J': case 'K': case 'L': case 'M': diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 885a710..b59a8f4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-15 Vladimir Makarov <vmakarov@redhat.com> + + PR rtl-optimization/64110 + * gcc.target/i386/pr64110.c: Add scan-assembler. + 2015-01-15 Thomas Schwinge <thomas@codesourcery.com> James Norris <jnorris@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com> diff --git a/gcc/testsuite/gcc.target/i386/pr64110.c b/gcc/testsuite/gcc.target/i386/pr64110.c index 84d8843..99e3919 100644 --- a/gcc/testsuite/gcc.target/i386/pr64110.c +++ b/gcc/testsuite/gcc.target/i386/pr64110.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O3 -march=core-avx2" } */ +/* { dg-final { scan-assembler "vmovd\[\\t \]" } } */ int foo (void); int a; |