diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-12-14 11:08:22 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-12-14 11:08:22 +0000 |
commit | 8cd8199294dcbe7aff2cf940827395bd1d1aa7b5 (patch) | |
tree | 97daabe9b2863aea49be55758279333791010641 /gcc/regclass.c | |
parent | 170c7d6384b07fdd933601659304f0e531c58709 (diff) | |
download | gcc-8cd8199294dcbe7aff2cf940827395bd1d1aa7b5.tar.gz |
* regclass.c (record_reg_classes): Handle INOUT operands propertly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30912 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r-- | gcc/regclass.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c index 630e3e8cfee..f48a7c2658c 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -1306,18 +1306,24 @@ record_reg_classes (n_alts, n_ops, ops, modes, subreg_changes_size, for (class = 0; class < N_REG_CLASSES; class++) pp->cost[class] - = (recog_data.operand_type[i] == OP_IN - ? may_move_in_cost[class][(int) classes[i]] - : may_move_out_cost[(int) classes[i]][class]); + = ((recog_data.operand_type[i] != OP_OUT + ? may_move_in_cost[class][(int) classes[i]] + : 0) + + (recog_data.operand_type[i] != OP_IN + ? may_move_out_cost[(int) classes[i]][class] + : 0)); /* If the alternative actually allows memory, make things a bit cheaper since we won't need an extra insn to load it. */ pp->mem_cost - = (MEMORY_MOVE_COST (mode, classes[i], - recog_data.operand_type[i] == OP_IN) - - allows_mem[i]); + = ((recog_data.operand_type[i] != OP_IN + ? MEMORY_MOVE_COST (mode, classes[i], 0) + : 0) + + (recog_data.operand_type[i] != OP_OUT + ? MEMORY_MOVE_COST (mode, classes[i], 1) + : 0) - allows_mem[i]); /* If we have assigned a class to this register in our first pass, add a cost to this alternative corresponding @@ -1527,18 +1533,24 @@ record_reg_classes (n_alts, n_ops, ops, modes, subreg_changes_size, for (class = 0; class < N_REG_CLASSES; class++) pp->cost[class] - = (recog_data.operand_type[i] == OP_IN - ? may_move_in_cost[class][(int) classes[i]] - : may_move_out_cost[(int) classes[i]][class]); + = ((recog_data.operand_type[i] != OP_OUT + ? may_move_in_cost[class][(int) classes[i]] + : 0) + + (recog_data.operand_type[i] != OP_IN + ? may_move_out_cost[(int) classes[i]][class] + : 0)); /* If the alternative actually allows memory, make things a bit cheaper since we won't need an extra insn to load it. */ pp->mem_cost - = (MEMORY_MOVE_COST (mode, classes[i], - recog_data.operand_type[i] == OP_IN) - - allows_mem[i]); + = ((recog_data.operand_type[i] != OP_IN + ? MEMORY_MOVE_COST (mode, classes[i], 0) + : 0) + + (recog_data.operand_type[i] != OP_OUT + ? MEMORY_MOVE_COST (mode, classes[i], 1) + : 0) - allows_mem[i]); /* If we have assigned a class to this register in our first pass, add a cost to this alternative corresponding |