diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-06-04 17:34:03 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-06-04 17:34:03 +0000 |
commit | 5efe5dec7a9db46a8514e6a0e1ef9bacc38cd807 (patch) | |
tree | ce044c3ca53f5e72f7cc64bc3e179dc07f77c216 /gcc/recog.h | |
parent | 29d70a0f6998f34ef7f6fbeff2455dd2d875159f (diff) | |
download | gcc-5efe5dec7a9db46a8514e6a0e1ef9bacc38cd807.zip gcc-5efe5dec7a9db46a8514e6a0e1ef9bacc38cd807.tar.gz gcc-5efe5dec7a9db46a8514e6a0e1ef9bacc38cd807.tar.bz2 |
recog.h (alternative_class): New function.
gcc/
* recog.h (alternative_class): New function.
(which_op_alt): Return a const recog_op_alt.
* reg-stack.c (check_asm_stack_operands): Update type accordingly.
(subst_asm_stack_regs): Likewise.
* config/arm/arm.c (note_invalid_constants): Likewise.
* regcprop.c (copyprop_hardreg_forward_1): Likewise. Don't modify
the operand_alternative; use alternative class instead.
* sel-sched.c (get_reg_class): Likewise.
* regrename.c (build_def_use): Likewise.
(hide_operands, restore_operands, record_out_operands): Update type
accordingly.
From-SVN: r211238
Diffstat (limited to 'gcc/recog.h')
-rw-r--r-- | gcc/recog.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/recog.h b/gcc/recog.h index 1473486..3dae18b 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -79,6 +79,14 @@ struct operand_alternative unsigned int anything_ok:1; }; +/* Return the class for operand I of alternative ALT, taking matching + constraints into account. */ + +static inline enum reg_class +alternative_class (const operand_alternative *alt, int i) +{ + return alt[i].matches >= 0 ? alt[alt[i].matches].cl : alt[i].cl; +} extern void init_recog (void); extern void init_recog_no_volatile (void); @@ -263,7 +271,7 @@ extern struct operand_alternative recog_op_alt[MAX_RECOG_OPERANDS on operand OP of the current instruction alternative (which_alternative). Only valid after calling preprocess_constraints and constrain_operands. */ -inline static operand_alternative * +inline static const operand_alternative * which_op_alt () { gcc_checking_assert (IN_RANGE (which_alternative, 0, |