diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-06-04 17:33:51 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-06-04 17:33:51 +0000 |
commit | 29d70a0f6998f34ef7f6fbeff2455dd2d875159f (patch) | |
tree | 1ffbb6533d75b91c157c61a310b32daa018bf38c /gcc/recog.h | |
parent | fe6ebcf19314d86bf8d7a1532f1b2b3b548bfa00 (diff) | |
download | gcc-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/recog.h')
-rw-r--r-- | gcc/recog.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/recog.h b/gcc/recog.h index 8c8d55f..1473486 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -256,9 +256,20 @@ struct recog_data_d extern struct recog_data_d recog_data; -/* Contains a vector of operand_alternative structures for every operand. - Set up by preprocess_constraints. */ -extern struct operand_alternative recog_op_alt[MAX_RECOG_OPERANDS][MAX_RECOG_ALTERNATIVES]; +extern struct operand_alternative recog_op_alt[MAX_RECOG_OPERANDS + * MAX_RECOG_ALTERNATIVES]; + +/* Return a pointer to an array in which index OP describes the constraints + on operand OP of the current instruction alternative (which_alternative). + Only valid after calling preprocess_constraints and constrain_operands. */ + +inline static operand_alternative * +which_op_alt () +{ + gcc_checking_assert (IN_RANGE (which_alternative, 0, + recog_data.n_alternatives - 1)); + return &recog_op_alt[which_alternative * recog_data.n_operands]; +} /* A table defined in insn-output.c that give information about each insn-code value. */ |