summaryrefslogtreecommitdiff
path: root/gcc/regclass.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-29 11:47:11 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-29 11:47:11 +0000
commit8c96295aab61f7672848d6d19221db5d69b29a86 (patch)
tree982bd83768558b64f9db22b812a385125678a077 /gcc/regclass.c
parenta1149005b3dbe9d54c8a1d0b3a9bcf81fcb534b0 (diff)
downloadgcc-8c96295aab61f7672848d6d19221db5d69b29a86.tar.gz
* regclass.c (scan_one_insn): Remove splitting of
two address insns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124277 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r--gcc/regclass.c64
1 files changed, 1 insertions, 63 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 0a1114dabc7..60af8acdcac 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -1029,7 +1029,7 @@ record_operand_costs (rtx insn, struct costs *op_costs,
there. */
static rtx
-scan_one_insn (rtx insn, int pass)
+scan_one_insn (rtx insn, int pass ATTRIBUTE_UNUSED)
{
enum rtx_code pat_code;
rtx set, note;
@@ -1069,68 +1069,6 @@ scan_one_insn (rtx insn, int pass)
return insn;
}
- /* Improve handling of two-address insns such as
- (set X (ashift CONST Y)) where CONST must be made to
- match X. Change it into two insns: (set X CONST)
- (set X (ashift X Y)). If we left this for reloading, it
- would probably get three insns because X and Y might go
- in the same place. This prevents X and Y from receiving
- the same hard reg.
-
- We can only do this if the modes of operands 0 and 1
- (which might not be the same) are tieable and we only need
- do this during our first pass. */
-
- if (pass == 0 && optimize
- && recog_data.n_operands >= 3
- && recog_data.constraints[1][0] == '0'
- && recog_data.constraints[1][1] == 0
- && CONSTANT_P (recog_data.operand[1])
- && ! rtx_equal_p (recog_data.operand[0], recog_data.operand[1])
- && ! rtx_equal_p (recog_data.operand[0], recog_data.operand[2])
- && REG_P (recog_data.operand[0])
- && MODES_TIEABLE_P (GET_MODE (recog_data.operand[0]),
- recog_data.operand_mode[1]))
- {
- rtx previnsn = prev_real_insn (insn);
- rtx dest
- = gen_lowpart (recog_data.operand_mode[1],
- recog_data.operand[0]);
- rtx newinsn
- = emit_insn_before (gen_move_insn (dest, recog_data.operand[1]), insn);
-
- /* If this insn was the start of a basic block,
- include the new insn in that block.
- We need not check for code_label here;
- while a basic block can start with a code_label,
- INSN could not be at the beginning of that block. */
- if (previnsn == 0 || JUMP_P (previnsn))
- {
- basic_block b;
- FOR_EACH_BB (b)
- if (insn == BB_HEAD (b))
- BB_HEAD (b) = newinsn;
- }
-
- /* This makes one more setting of new insns's dest. */
- REG_N_SETS (REGNO (recog_data.operand[0]))++;
- REG_N_REFS (REGNO (recog_data.operand[0]))++;
- REG_FREQ (REGNO (recog_data.operand[0])) += frequency;
-
- *recog_data.operand_loc[1] = recog_data.operand[0];
- REG_N_REFS (REGNO (recog_data.operand[0]))++;
- REG_FREQ (REGNO (recog_data.operand[0])) += frequency;
- for (i = recog_data.n_dups - 1; i >= 0; i--)
- if (recog_data.dup_num[i] == 1)
- {
- *recog_data.dup_loc[i] = recog_data.operand[0];
- REG_N_REFS (REGNO (recog_data.operand[0]))++;
- REG_FREQ (REGNO (recog_data.operand[0])) += frequency;
- }
-
- return PREV_INSN (newinsn);
- }
-
record_operand_costs (insn, op_costs, reg_pref);
/* Now add the cost for each operand to the total costs for