aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2014-06-04 17:33:51 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-06-04 17:33:51 +0000
commit29d70a0f6998f34ef7f6fbeff2455dd2d875159f (patch)
tree1ffbb6533d75b91c157c61a310b32daa018bf38c /gcc/config/i386/i386.c
parentfe6ebcf19314d86bf8d7a1532f1b2b3b548bfa00 (diff)
downloadgcc-29d70a0f6998f34ef7f6fbeff2455dd2d875159f.zip
gcc-29d70a0f6998f34ef7f6fbeff2455dd2d875159f.tar.gz
gcc-29d70a0f6998f34ef7f6fbeff2455dd2d875159f.tar.bz2
recog.h (recog_op_alt): Convert to a flat array.
gcc/ * recog.h (recog_op_alt): Convert to a flat array. (which_op_alt): New function. * recog.c (recog_op_alt): Convert to a flat array. (preprocess_constraints): Update accordingly, grouping all operands of the same alternative together, rather than the other way around. * ira-lives.c (check_and_make_def_conflict): Likewise. (make_early_clobber_and_input_conflicts): Likewise. * config/i386/i386.c (ix86_legitimate_combined_insn): Likewise. * reg-stack.c (check_asm_stack_operands): Use which_op_alt. (subst_asm_stack_regs): Likewise. * regcprop.c (copyprop_hardreg_forward_1): Likewise. * regrename.c (hide_operands, record_out_operands): Likewise. (build_def_use): Likewise. * sel-sched.c (get_reg_class): Likewise. * config/arm/arm.c (note_invalid_constants): Likewise. From-SVN: r211237
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r--gcc/config/i386/i386.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e9a6b04..21fa8f4 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -5829,11 +5829,13 @@ ix86_legitimate_combined_insn (rtx insn)
extract_insn (insn);
preprocess_constraints ();
- for (i = 0; i < recog_data.n_operands; i++)
+ int n_operands = recog_data.n_operands;
+ int n_alternatives = recog_data.n_alternatives;
+ for (i = 0; i < n_operands; i++)
{
rtx op = recog_data.operand[i];
enum machine_mode mode = GET_MODE (op);
- struct operand_alternative *op_alt;
+ operand_alternative *op_alt;
int offset = 0;
bool win;
int j;
@@ -5868,19 +5870,19 @@ ix86_legitimate_combined_insn (rtx insn)
if (!(REG_P (op) && HARD_REGISTER_P (op)))
continue;
- op_alt = recog_op_alt[i];
+ op_alt = recog_op_alt;
/* Operand has no constraints, anything is OK. */
- win = !recog_data.n_alternatives;
+ win = !n_alternatives;
- for (j = 0; j < recog_data.n_alternatives; j++)
+ for (j = 0; j < n_alternatives; j++, op_alt += n_operands)
{
- if (op_alt[j].anything_ok
- || (op_alt[j].matches != -1
+ if (op_alt[i].anything_ok
+ || (op_alt[i].matches != -1
&& operands_match_p
(recog_data.operand[i],
- recog_data.operand[op_alt[j].matches]))
- || reg_fits_class_p (op, op_alt[j].cl, offset, mode))
+ recog_data.operand[op_alt[i].matches]))
+ || reg_fits_class_p (op, op_alt[i].cl, offset, mode))
{
win = true;
break;