On Fri, May 31, 2013 at 02:11:38PM -0400, Vladimir Makarov wrote:
The following patch switches LRA on for s390. The patch introduces
a new option -mlra to use LRA instead of reload. I did not document
the option as I'd like to delete it for gcc4.9. By default, LRA will
be used for s390 instead of reload for better testing LRA for s390.
Changes in s390.md are because of define_splits for the last
alternative *movmem_short, *clrmem_short, *cmpmem_short have guard
TARGET_CPU_ZARCH.
The patch was successfully bootstrapped and tested on s390x.
Any comments?
Is it ok to commit the patch into trunk?
Thanks.
2013-05-31 Vladimir Makarov <vmaka...@redhat.com>
* config/s390/s390.opt (mlra): New option.
* config/s390/s390.c (s390_decompose_address): Check displacement
for all registers for LRA.
(s390_secondary_reload): Don't used secondary reloads for LRA.
(s390_lra_p): New function.
(TARGET_LRA_P): Define.
* config/s390/s390.md (*movmem_short, *clrmem_short): Change value
of attribute cpu_facility to zarch for the last alternative.
(*cmpmem_short): Ditto.
I've applied the attached patch. This helps me getting a little
further when bootstrapping with lra and --with-arch=zEC12.
2013-06-07 Andreas Krebbel <andreas.kreb...@de.ibm.com>
* config/s390/s390.md (cpu_facility): Add cpu_zarch.
("*movmem_short", "*clrmem_short", "*cmpmem_short): Use cpu_zarch
for last alternative in the cpu_facility attribute.
---
gcc/config/s390/s390.md | 13 ++++!!!!!!!!!
1 file changed, 4 insertions(+), 9 modifications(!)
Index: gcc/config/s390/s390.md
===================================================================
*** gcc/config/s390/s390.md.orig
--- gcc/config/s390/s390.md
***************
*** 277,283 ****
(define_attr "cpu" "g5,g6,z900,z990,z9_109,z9_ec,z10,z196,zEC12"
(const (symbol_ref "s390_tune_attr")))
! (define_attr "cpu_facility" "standard,ieee,zarch,longdisp,extimm,dfp,z10,z196,zEC12"
(const_string "standard"))
(define_attr "enabled" ""
--- 277,284 ----
(define_attr "cpu" "g5,g6,z900,z990,z9_109,z9_ec,z10,z196,zEC12"
(const (symbol_ref "s390_tune_attr")))
! (define_attr "cpu_facility"
! "standard,ieee,zarch,cpu_zarch,longdisp,extimm,dfp,z10,z196,zEC12"
(const_string "standard"))
(define_attr "enabled" ""
***************
*** 304,309 ****
--- 305,314 ----
(match_test "TARGET_DFP"))
(const_int 1)
+ (and (eq_attr "cpu_facility" "cpu_zarch")
+ (match_test "TARGET_CPU_ZARCH"))
+ (const_int 1)
+
(and (eq_attr "cpu_facility" "z10")
(match_test "TARGET_Z10"))
(const_int 1)
***************
*** 2690,2696 ****
"(GET_MODE (operands[2]) == Pmode || GET_MODE (operands[2]) == VOIDmode)"
"#"
[(set_attr "type" "cs")
! (set_attr "cpu_facility" "*,*,z10,zarch")])
(define_split
[(set (match_operand:BLK 0 "memory_operand" "")
--- 2695,2701 ----
"(GET_MODE (operands[2]) == Pmode || GET_MODE (operands[2]) == VOIDmode)"
"#"
[(set_attr "type" "cs")
! (set_attr "cpu_facility" "*,*,z10,cpu_zarch")])
(define_split
[(set (match_operand:BLK 0 "memory_operand" "")
***************
*** 2899,2905 ****
"(GET_MODE (operands[1]) == Pmode || GET_MODE (operands[1]) == VOIDmode)"
"#"
[(set_attr "type" "cs")
! (set_attr "cpu_facility" "*,*,z10,zarch")])
(define_split
[(set (match_operand:BLK 0 "memory_operand" "")
--- 2904,2910 ----
"(GET_MODE (operands[1]) == Pmode || GET_MODE (operands[1]) == VOIDmode)"
"#"
[(set_attr "type" "cs")
! (set_attr "cpu_facility" "*,*,z10,cpu_zarch")])
(define_split
[(set (match_operand:BLK 0 "memory_operand" "")
***************
*** 3075,3081 ****
"(GET_MODE (operands[2]) == Pmode || GET_MODE (operands[2]) == VOIDmode)"
"#"
[(set_attr "type" "cs")
! (set_attr "cpu_facility" "*,*,z10,zarch")])
(define_split
[(set (reg:CCU CC_REGNUM)
--- 3080,3086 ----
"(GET_MODE (operands[2]) == Pmode || GET_MODE (operands[2]) == VOIDmode)"
"#"
[(set_attr "type" "cs")
! (set_attr "cpu_facility" "*,*,z10,cpu_zarch")])
(define_split
[(set (reg:CCU CC_REGNUM)