From: Kyrylo Tkachov Date: Tue, 31 May 2016 11:04:41 +0000 (+0000) Subject: [AArch64] Remove aarch64_simd_attr_length_move X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd78b3dd1824d0c7a77891365c756d67a9d5c1dc;p=gcc.git [AArch64] Remove aarch64_simd_attr_length_move * config/aarch64/aarch64.c (aarch64_simd_attr_length_move): Delete. * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_move): Delete prototype. * config/aarch64/iterators.md (insn_count): Add descriptive comment. * config/aarch64/aarch64-simd.md (*aarch64_mov, VSTRUCT modes): Remove use of aarch64_simd_attr_length_move, set length attribute directly. (*aarch64_be_movoi): Likewise. (*aarch64_be_movci): Likewise. (*aarch64_be_movxi): Likewise. From-SVN: r236916 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bb5b0c67462..ae81bbfb1a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2016-05-31 Kyrylo Tkachov + + * config/aarch64/aarch64.c (aarch64_simd_attr_length_move): Delete. + * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_move): + Delete prototype. + * config/aarch64/iterators.md (insn_count): Add descriptive comment. + * config/aarch64/aarch64-simd.md (*aarch64_mov, VSTRUCT modes): + Remove use of aarch64_simd_attr_length_move, set length attribute + directly. + (*aarch64_be_movoi): Likewise. + (*aarch64_be_movci): Likewise. + (*aarch64_be_movxi): Likewise. + 2016-05-31 Jan Hubicka * loop-init.c (gate): Do not enale RTL loop unroller with -fpeel-loops. diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index dcf1748d82f..ab9b37a771f 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -333,7 +333,6 @@ machine_mode aarch64_hard_regno_caller_save_mode (unsigned, unsigned, machine_mode); int aarch64_hard_regno_mode_ok (unsigned, machine_mode); int aarch64_hard_regno_nregs (unsigned, machine_mode); -int aarch64_simd_attr_length_move (rtx_insn *); int aarch64_uxt_size (int, HOST_WIDE_INT); int aarch64_vec_fpconst_pow_of_2 (rtx); rtx aarch64_final_eh_return_addr (void); diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index fe1c22bfdf7..6ea35bf487e 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -4639,7 +4639,7 @@ ld1\\t{%S0.16b - %0.16b}, %1" [(set_attr "type" "multiple,neon_store_reg_q,\ neon_load_reg_q") - (set (attr "length") (symbol_ref "aarch64_simd_attr_length_move (insn)"))] + (set_attr "length" ",4,4")] ) (define_insn "aarch64_be_ld1" @@ -4672,7 +4672,7 @@ stp\\t%q1, %R1, %0 ldp\\t%q0, %R0, %1" [(set_attr "type" "multiple,neon_stp_q,neon_ldp_q") - (set (attr "length") (symbol_ref "aarch64_simd_attr_length_move (insn)"))] + (set_attr "length" "8,4,4")] ) (define_insn "*aarch64_be_movci" @@ -4683,7 +4683,7 @@ || register_operand (operands[1], CImode))" "#" [(set_attr "type" "multiple") - (set (attr "length") (symbol_ref "aarch64_simd_attr_length_move (insn)"))] + (set_attr "length" "12,4,4")] ) (define_insn "*aarch64_be_movxi" @@ -4694,7 +4694,7 @@ || register_operand (operands[1], XImode))" "#" [(set_attr "type" "multiple") - (set (attr "length") (symbol_ref "aarch64_simd_attr_length_move (insn)"))] + (set_attr "length" "16,4,4")] ) (define_split diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index d2ac25ce339..3ec5c9fb635 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -10734,33 +10734,6 @@ aarch64_simd_emit_reg_reg_move (rtx *operands, enum machine_mode mode, gen_rtx_REG (mode, rsrc + count - i - 1)); } -/* Compute and return the length of aarch64_simd_mov, where is - one of VSTRUCT modes: OI, CI or XI. */ -int -aarch64_simd_attr_length_move (rtx_insn *insn) -{ - machine_mode mode; - - extract_insn_cached (insn); - - if (REG_P (recog_data.operand[0]) && REG_P (recog_data.operand[1])) - { - mode = GET_MODE (recog_data.operand[0]); - switch (mode) - { - case OImode: - return 8; - case CImode: - return 12; - case XImode: - return 16; - default: - gcc_unreachable (); - } - } - return 4; -} - /* Compute and return the length of aarch64_simd_reglist, where is one of VSTRUCT modes: OI, CI, or XI. */ int diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md index d9bd39112c3..43b22d81cda 100644 --- a/gcc/config/aarch64/iterators.md +++ b/gcc/config/aarch64/iterators.md @@ -715,6 +715,7 @@ (define_mode_attr vsi2qi [(V2SI "v8qi") (V4SI "v16qi")]) (define_mode_attr VSI2QI [(V2SI "V8QI") (V4SI "V16QI")]) +;; Sum of lengths of instructions needed to move vector registers of a mode. (define_mode_attr insn_count [(OI "8") (CI "12") (XI "16")]) ;; -fpic small model GOT reloc modifers: gotpage_lo15/lo14 for ILP64/32.