summaryrefslogtreecommitdiff
path: root/gcc/regrename.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-04 17:34:03 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-04 17:34:03 +0000
commit89a7a6a5af4c5310bcec82a3cd62596155eb9ceb (patch)
treece044c3ca53f5e72f7cc64bc3e179dc07f77c216 /gcc/regrename.c
parent757fefec3dacf9ed7b11727d6a4d7bbab5d88066 (diff)
downloadgcc-89a7a6a5af4c5310bcec82a3cd62596155eb9ceb.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211238 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r--gcc/regrename.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c
index df543c3697a..fa6ed49d1df 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;
- operand_alternative *op_alt = which_op_alt ();
+ const operand_alternative *op_alt = which_op_alt ();
for (i = 0; i < n_ops; i++)
{
old_operands[i] = recog_data.operand[i];
@@ -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;
- operand_alternative *op_alt = which_op_alt ();
+ const operand_alternative *op_alt = which_op_alt ();
int i;
@@ -1489,7 +1489,7 @@ 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 = op_alt[opn].cl;
+ enum reg_class cl = alternative_class (op_alt, opn);
struct du_head *prev_open;
@@ -1571,7 +1571,7 @@ build_def_use (basic_block bb)
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;
untracked_operands = 0;
@@ -1584,8 +1584,7 @@ build_def_use (basic_block bb)
sizeof (operand_rr_info) * recog_data.n_operands);
}
- /* Simplify the code below by rewriting things to reflect
- matching constraints. Also promote OP_OUT to OP_INOUT in
+ /* Simplify the code below by promoting OP_OUT to OP_INOUT in
predicated instructions, but only for register operands
that are already tracked, so that we can create a chain
when the first SET makes a register live. */
@@ -1595,8 +1594,6 @@ build_def_use (basic_block bb)
{
rtx op = recog_data.operand[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))
{
@@ -1681,7 +1678,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 = op_alt[opn].cl;
+ enum reg_class cl = alternative_class (op_alt, opn);
enum op_type type = recog_data.operand_type[opn];
/* Don't scan match_operand here, since we've no reg class