diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-04 17:33:51 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-04 17:33:51 +0000 |
commit | 757fefec3dacf9ed7b11727d6a4d7bbab5d88066 (patch) | |
tree | 1ffbb6533d75b91c157c61a310b32daa018bf38c /gcc/regcprop.c | |
parent | 106213008af48c244bcbc3eb763dc67f4c0cf345 (diff) | |
download | gcc-757fefec3dacf9ed7b11727d6a4d7bbab5d88066.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211237 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regcprop.c')
-rw-r--r-- | gcc/regcprop.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/gcc/regcprop.c b/gcc/regcprop.c index 25a20ec00eb..d55ee33a9e1 100644 --- a/gcc/regcprop.c +++ b/gcc/regcprop.c @@ -745,7 +745,7 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn)) { - int n_ops, i, alt, predicated; + int n_ops, i, predicated; bool is_asm, any_replacements; rtx set; rtx link; @@ -775,7 +775,7 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) if (! constrain_operands (1)) fatal_insn_not_found (insn); preprocess_constraints (); - alt = which_alternative; + operand_alternative *op_alt = which_op_alt (); n_ops = recog_data.n_operands; is_asm = asm_noperands (PATTERN (insn)) >= 0; @@ -786,10 +786,10 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) predicated = GET_CODE (PATTERN (insn)) == COND_EXEC; for (i = 0; i < n_ops; ++i) { - int matches = recog_op_alt[i][alt].matches; + int matches = op_alt[i].matches; if (matches >= 0) - recog_op_alt[i][alt].cl = recog_op_alt[matches][alt].cl; - if (matches >= 0 || recog_op_alt[i][alt].matched >= 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; } @@ -800,7 +800,7 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) /* For each earlyclobber operand, zap the value data. */ for (i = 0; i < n_ops; i++) - if (recog_op_alt[i][alt].earlyclobber) + if (op_alt[i].earlyclobber) kill_value (recog_data.operand[i], vd); /* Within asms, a clobber cannot overlap inputs or outputs. @@ -814,7 +814,7 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) /* Kill all early-clobbered operands. */ for (i = 0; i < n_ops; i++) - if (recog_op_alt[i][alt].earlyclobber) + if (op_alt[i].earlyclobber) kill_value (recog_data.operand[i], vd); /* If we have dead sets in the insn, then we need to note these as we @@ -936,17 +936,15 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) if (recog_data.operand_type[i] == OP_IN) { - if (recog_op_alt[i][alt].is_address) + if (op_alt[i].is_address) replaced[i] = replace_oldest_value_addr (recog_data.operand_loc[i], - recog_op_alt[i][alt].cl, - VOIDmode, ADDR_SPACE_GENERIC, - insn, vd); + op_alt[i].cl, 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], - recog_op_alt[i][alt].cl, - insn, vd); + op_alt[i].cl, insn, vd); else if (MEM_P (recog_data.operand[i])) replaced[i] = replace_oldest_value_mem (recog_data.operand[i], insn, vd); |