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/regrename.c | |
parent | fe6ebcf19314d86bf8d7a1532f1b2b3b548bfa00 (diff) | |
download | gcc-29d70a0f6998f34ef7f6fbeff2455dd2d875159f.tar.gz |
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/regrename.c')
-rw-r--r-- | gcc/regrename.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c index 019aee17860..df543c3697a 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -1427,7 +1427,7 @@ hide_operands (int n_ops, rtx *old_operands, rtx *old_dups, unsigned HOST_WIDE_INT do_not_hide, bool inout_and_ec_only) { int i; - int alt = which_alternative; + operand_alternative *op_alt = which_op_alt (); for (i = 0; i < n_ops; i++) { old_operands[i] = recog_data.operand[i]; @@ -1439,7 +1439,7 @@ hide_operands (int n_ops, rtx *old_operands, rtx *old_dups, if (do_not_hide & (1 << i)) continue; if (!inout_and_ec_only || recog_data.operand_type[i] == OP_INOUT - || recog_op_alt[i][alt].earlyclobber) + || op_alt[i].earlyclobber) *recog_data.operand_loc[i] = cc0_rtx; } for (i = 0; i < recog_data.n_dups; i++) @@ -1449,7 +1449,7 @@ hide_operands (int n_ops, rtx *old_operands, rtx *old_dups, if (do_not_hide & (1 << opn)) continue; if (!inout_and_ec_only || recog_data.operand_type[opn] == OP_INOUT - || recog_op_alt[opn][alt].earlyclobber) + || op_alt[opn].earlyclobber) *recog_data.dup_loc[i] = cc0_rtx; } } @@ -1478,7 +1478,7 @@ static void record_out_operands (rtx insn, bool earlyclobber, insn_rr_info *insn_info) { int n_ops = recog_data.n_operands; - int alt = which_alternative; + operand_alternative *op_alt = which_op_alt (); int i; @@ -1489,12 +1489,12 @@ record_out_operands (rtx insn, bool earlyclobber, insn_rr_info *insn_info) ? recog_data.operand_loc[opn] : recog_data.dup_loc[i - n_ops]); rtx op = *loc; - enum reg_class cl = recog_op_alt[opn][alt].cl; + enum reg_class cl = op_alt[opn].cl; struct du_head *prev_open; if (recog_data.operand_type[opn] != OP_OUT - || recog_op_alt[opn][alt].earlyclobber != earlyclobber) + || op_alt[opn].earlyclobber != earlyclobber) continue; if (insn_info) @@ -1539,7 +1539,6 @@ build_def_use (basic_block bb) rtx old_operands[MAX_RECOG_OPERANDS]; rtx old_dups[MAX_DUP_OPERANDS]; int i; - int alt; int predicated; enum rtx_code set_code = SET; enum rtx_code clobber_code = CLOBBER; @@ -1572,7 +1571,7 @@ build_def_use (basic_block bb) 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; untracked_operands = 0; @@ -1595,10 +1594,10 @@ build_def_use (basic_block bb) for (i = 0; i < n_ops; ++i) { rtx op = recog_data.operand[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; @@ -1682,7 +1681,7 @@ build_def_use (basic_block bb) rtx *loc = (i < n_ops ? recog_data.operand_loc[opn] : recog_data.dup_loc[i - n_ops]); - enum reg_class cl = recog_op_alt[opn][alt].cl; + enum reg_class cl = op_alt[opn].cl; enum op_type type = recog_data.operand_type[opn]; /* Don't scan match_operand here, since we've no reg class @@ -1694,7 +1693,7 @@ build_def_use (basic_block bb) if (insn_info) cur_operand = i == opn ? insn_info->op_info + i : NULL; - if (recog_op_alt[opn][alt].is_address) + if (op_alt[opn].is_address) scan_rtx_address (insn, loc, cl, mark_read, VOIDmode, ADDR_SPACE_GENERIC); else |