summaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-15 20:26:19 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-15 20:26:19 +0000
commited6272f7f323f289a2b10e156d24f073aa2e8887 (patch)
tree8ad53dce7dd0dcd0dfba90387bdd8075e7e631b3 /gcc/lra-constraints.c
parentca4c354552639d3bac6d1f690d9e04017d7d80ed (diff)
downloadgcc-ed6272f7f323f289a2b10e156d24f073aa2e8887.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219683 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r--gcc/lra-constraints.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index cdfa94441e0..f102fe5010f 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. */