aboutsummaryrefslogtreecommitdiff
path: root/gcc/regcprop.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2014-06-04 17:34:03 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-06-04 17:34:03 +0000
commit5efe5dec7a9db46a8514e6a0e1ef9bacc38cd807 (patch)
treece044c3ca53f5e72f7cc64bc3e179dc07f77c216 /gcc/regcprop.c
parent29d70a0f6998f34ef7f6fbeff2455dd2d875159f (diff)
downloadgcc-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/regcprop.c')
-rw-r--r--gcc/regcprop.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/regcprop.c b/gcc/regcprop.c
index d55ee33..56efc94 100644
--- a/gcc/regcprop.c
+++ b/gcc/regcprop.c
@@ -775,20 +775,17 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
if (! constrain_operands (1))
fatal_insn_not_found (insn);
preprocess_constraints ();
- operand_alternative *op_alt = which_op_alt ();
+ const operand_alternative *op_alt = which_op_alt ();
n_ops = recog_data.n_operands;
is_asm = asm_noperands (PATTERN (insn)) >= 0;
- /* Simplify the code below by rewriting things to reflect
- matching constraints. Also promote OP_OUT to OP_INOUT
+ /* Simplify the code below by promoting OP_OUT to OP_INOUT
in predicated instructions. */
predicated = GET_CODE (PATTERN (insn)) == COND_EXEC;
for (i = 0; i < n_ops; ++i)
{
int matches = op_alt[i].matches;
- if (matches >= 0)
- op_alt[i].cl = op_alt[matches].cl;
if (matches >= 0 || op_alt[i].matched >= 0
|| (predicated && recog_data.operand_type[i] == OP_OUT))
recog_data.operand_type[i] = OP_INOUT;
@@ -939,12 +936,14 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
if (op_alt[i].is_address)
replaced[i]
= replace_oldest_value_addr (recog_data.operand_loc[i],
- op_alt[i].cl, VOIDmode,
- ADDR_SPACE_GENERIC, insn, vd);
+ alternative_class (op_alt, i),
+ VOIDmode, ADDR_SPACE_GENERIC,
+ insn, vd);
else if (REG_P (recog_data.operand[i]))
replaced[i]
= replace_oldest_value_reg (recog_data.operand_loc[i],
- op_alt[i].cl, insn, vd);
+ alternative_class (op_alt, i),
+ insn, vd);
else if (MEM_P (recog_data.operand[i]))
replaced[i] = replace_oldest_value_mem (recog_data.operand[i],
insn, vd);