Commit 64e1e4c4 by Steven Bosscher Committed by Steven Bosscher

s390.md: Remove the generic pipeline description.

	* config/s390/s390.md: Remove the generic pipeline description.
	* config/s390/2064.md: Make all insn reservations apply to
	the z900, g5 and g6.
	* config/s390/s390.c (s390_use_dfa_pipeline_interface): Remove.
	(TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE):
	Define to hook_int_void_1.
	(s390_adjust_cost): Cleanup.  Don't check address dependency here.
	(s390_first_cycle_multipass_dfa_lookahead):

Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>

From-SVN: r83350
parent 06d72ee6
2004-06-18 Steven Bosscher <stevenb@suse.de>
Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* config/s390/s390.md: Remove the generic pipeline description.
* config/s390/2064.md: Make all insn reservations apply to
the z900, g5 and g6.
* config/s390/s390.c (s390_use_dfa_pipeline_interface): Remove.
(TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE):
Define to hook_int_void_1.
(s390_adjust_cost): Cleanup. Don't check address dependency here.
(s390_first_cycle_multipass_dfa_lookahead): Always return 4.
2004-06-18 Daniel Berlin <dberlin@dberlin.org> 2004-06-18 Daniel Berlin <dberlin@dberlin.org>
Diego Novillo <dnovillo@redhat.com> Diego Novillo <dnovillo@redhat.com>
......
...@@ -40,43 +40,45 @@ ...@@ -40,43 +40,45 @@
;; | ;; |
;; wr ;; wr
;; This scheduler description is also used for the g5 and g6.
(define_automaton "z_ipu") (define_automaton "z_ipu")
(define_cpu_unit "z_e1" "z_ipu") (define_cpu_unit "z_e1" "z_ipu")
(define_cpu_unit "z_wr" "z_ipu") (define_cpu_unit "z_wr" "z_ipu")
(define_insn_reservation "z_la" 1 (define_insn_reservation "z_la" 1
(and (eq_attr "cpu" "z900") (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "la")) (eq_attr "type" "la"))
"z_e1,z_wr") "z_e1,z_wr")
(define_insn_reservation "z_larl" 1 (define_insn_reservation "z_larl" 1
(and (eq_attr "cpu" "z900") (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "larl")) (eq_attr "type" "larl"))
"z_e1,z_wr") "z_e1,z_wr")
(define_insn_reservation "z_load" 1 (define_insn_reservation "z_load" 1
(and (eq_attr "cpu" "z900") (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "load")) (eq_attr "type" "load"))
"z_e1,z_wr") "z_e1,z_wr")
(define_insn_reservation "z_store" 1 (define_insn_reservation "z_store" 1
(and (eq_attr "cpu" "z900") (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "store")) (eq_attr "type" "store"))
"z_e1,z_wr") "z_e1,z_wr")
(define_insn_reservation "z_call" 5 (define_insn_reservation "z_call" 5
(and (eq_attr "cpu" "z900") (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "jsr")) (eq_attr "type" "jsr"))
"z_e1*5,z_wr") "z_e1*5,z_wr")
(define_insn_reservation "z_o2" 2 (define_insn_reservation "z_o2" 2
(and (eq_attr "cpu" "z900") (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "o2")) (eq_attr "type" "o2"))
"z_e1*2,z_wr") "z_e1*2,z_wr")
(define_insn_reservation "z_o3" 3 (define_insn_reservation "z_o3" 3
(and (eq_attr "cpu" "z900") (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "o3")) (eq_attr "type" "o3"))
"z_e1*3,z_wr") "z_e1*3,z_wr")
...@@ -86,12 +88,12 @@ ...@@ -86,12 +88,12 @@
; ;
(define_insn_reservation "z_int" 1 (define_insn_reservation "z_int" 1
(and (eq_attr "cpu" "z900") (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "atype" "reg")) (eq_attr "atype" "reg"))
"z_e1,z_wr") "z_e1,z_wr")
(define_insn_reservation "z_agen" 1 (define_insn_reservation "z_agen" 1
(and (eq_attr "cpu" "z900") (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "atype" "agen")) (eq_attr "atype" "agen"))
"z_e1,z_wr") "z_e1,z_wr")
......
...@@ -72,7 +72,6 @@ static enum attr_type s390_safe_attr_type (rtx); ...@@ -72,7 +72,6 @@ static enum attr_type s390_safe_attr_type (rtx);
static int s390_adjust_cost (rtx, rtx, rtx, int); static int s390_adjust_cost (rtx, rtx, rtx, int);
static int s390_adjust_priority (rtx, int); static int s390_adjust_priority (rtx, int);
static int s390_issue_rate (void); static int s390_issue_rate (void);
static int s390_use_dfa_pipeline_interface (void);
static int s390_first_cycle_multipass_dfa_lookahead (void); static int s390_first_cycle_multipass_dfa_lookahead (void);
static bool s390_rtx_costs (rtx, int, int, int *); static bool s390_rtx_costs (rtx, int, int, int *);
static int s390_address_cost (rtx); static int s390_address_cost (rtx);
...@@ -132,7 +131,7 @@ static bool s390_call_saved_register_used (tree); ...@@ -132,7 +131,7 @@ static bool s390_call_saved_register_used (tree);
#undef TARGET_SCHED_ISSUE_RATE #undef TARGET_SCHED_ISSUE_RATE
#define TARGET_SCHED_ISSUE_RATE s390_issue_rate #define TARGET_SCHED_ISSUE_RATE s390_issue_rate
#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE #undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE s390_use_dfa_pipeline_interface #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE hook_int_void_1
#undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD #undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD
#define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD s390_first_cycle_multipass_dfa_lookahead #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD s390_first_cycle_multipass_dfa_lookahead
...@@ -3902,9 +3901,6 @@ s390_agen_dep_p (rtx dep_insn, rtx insn) ...@@ -3902,9 +3901,6 @@ s390_agen_dep_p (rtx dep_insn, rtx insn)
static int static int
s390_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost) s390_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
{ {
rtx dep_rtx;
int i;
/* If the dependence is an anti-dependence, there is no cost. For an /* If the dependence is an anti-dependence, there is no cost. For an
output dependence, there is sometimes a cost, but it doesn't seem output dependence, there is sometimes a cost, but it doesn't seem
worth handling those few cases. */ worth handling those few cases. */
...@@ -3916,35 +3912,16 @@ s390_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost) ...@@ -3916,35 +3912,16 @@ s390_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0) if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0)
return cost; return cost;
/* DFA based scheduling checks address dependency in md file. */ /* Operand forward in case of lr, load and la. */
if (s390_use_dfa_pipeline_interface ()) if (s390_tune == PROCESSOR_2084_Z990
{ && cost == 1
/* Operand forward in case of lr, load and la. */ && (s390_safe_attr_type (dep_insn) == TYPE_LA
if (s390_tune == PROCESSOR_2084_Z990 || s390_safe_attr_type (dep_insn) == TYPE_LR
&& cost == 1 || s390_safe_attr_type (dep_insn) == TYPE_LOAD))
&& (s390_safe_attr_type (dep_insn) == TYPE_LA return 0;
|| s390_safe_attr_type (dep_insn) == TYPE_LR
|| s390_safe_attr_type (dep_insn) == TYPE_LOAD))
return 0;
return cost;
}
dep_rtx = PATTERN (dep_insn);
if (GET_CODE (dep_rtx) == SET
&& addr_generation_dependency_p (dep_rtx, insn))
cost += (s390_safe_attr_type (dep_insn) == TYPE_LA) ? 1 : 4;
else if (GET_CODE (dep_rtx) == PARALLEL)
{
for (i = 0; i < XVECLEN (dep_rtx, 0); i++)
{
if (addr_generation_dependency_p (XVECEXP (dep_rtx, 0, i), insn))
cost += (s390_safe_attr_type (dep_insn) == TYPE_LA) ? 1 : 4;
}
}
return cost; return cost;
} }
/* A C statement (sans semicolon) to update the integer scheduling priority /* A C statement (sans semicolon) to update the integer scheduling priority
INSN_PRIORITY (INSN). Increase the priority to execute the INSN earlier, INSN_PRIORITY (INSN). Increase the priority to execute the INSN earlier,
reduce the priority to execute INSN later. Do not define this macro if reduce the priority to execute INSN later. Do not define this macro if
...@@ -3987,23 +3964,10 @@ s390_issue_rate (void) ...@@ -3987,23 +3964,10 @@ s390_issue_rate (void)
return 1; return 1;
} }
/* If the following function returns TRUE, we will use the the DFA
insn scheduler. */
static int
s390_use_dfa_pipeline_interface (void)
{
if (s390_tune == PROCESSOR_2064_Z900
|| s390_tune == PROCESSOR_2084_Z990)
return 1;
return 0;
}
static int static int
s390_first_cycle_multipass_dfa_lookahead (void) s390_first_cycle_multipass_dfa_lookahead (void)
{ {
return s390_use_dfa_pipeline_interface () ? 4 : 0; return 4;
} }
......
...@@ -135,7 +135,9 @@ ...@@ -135,7 +135,9 @@
;; Processor type. This attribute must exactly match the processor_type ;; Processor type. This attribute must exactly match the processor_type
;; enumeration in s390.h. ;; enumeration in s390.h. The current machine description does not
;; distinguish between g5 and g6, but there are differences between the two
;; CPUs could in theory be modeled.
(define_attr "cpu" "g5,g6,z900,z990" (define_attr "cpu" "g5,g6,z900,z990"
(const (symbol_ref "s390_tune"))) (const (symbol_ref "s390_tune")))
...@@ -182,107 +184,11 @@ ...@@ -182,107 +184,11 @@
(eq_attr "op_type" "SIY") (const_string "agen")] (eq_attr "op_type" "SIY") (const_string "agen")]
(const_string "reg"))) (const_string "reg")))
;; Generic pipeline function unit. ;; Pipeline description for z900. For lack of anything better,
;; this description is also used for the g5 and g6.
(define_function_unit "integer" 1 0
(eq_attr "type" "none") 0 0)
(define_function_unit "integer" 1 0
(eq_attr "type" "integer") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "fsimpd") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "fsimps") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "load") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "floadd") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "floads") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "la") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "larl") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "lr") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "branch") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "store") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "fstored") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "fstores") 1 1)
(define_function_unit "integer" 1 0
(eq_attr "type" "lm") 2 2)
(define_function_unit "integer" 1 0
(eq_attr "type" "stm") 2 2)
(define_function_unit "integer" 1 0
(eq_attr "type" "cs") 5 5)
(define_function_unit "integer" 1 0
(eq_attr "type" "vs") 30 30)
(define_function_unit "integer" 1 0
(eq_attr "type" "jsr") 5 5)
(define_function_unit "integer" 1 0
(eq_attr "type" "imul") 7 7)
(define_function_unit "integer" 1 0
(eq_attr "type" "fmuld") 6 6)
(define_function_unit "integer" 1 0
(eq_attr "type" "fmuls") 6 6)
(define_function_unit "integer" 1 0
(eq_attr "type" "idiv") 33 33)
(define_function_unit "integer" 1 0
(eq_attr "type" "fdivd") 33 33)
(define_function_unit "integer" 1 0
(eq_attr "type" "fdivs") 33 33)
(define_function_unit "integer" 1 0
(eq_attr "type" "fsqrtd") 30 30)
(define_function_unit "integer" 1 0
(eq_attr "type" "fsqrts") 30 30)
(define_function_unit "integer" 1 0
(eq_attr "type" "ftoi") 2 2)
(define_function_unit "integer" 1 0
(eq_attr "type" "itof") 2 2)
(define_function_unit "integer" 1 0
(eq_attr "type" "o2") 2 2)
(define_function_unit "integer" 1 0
(eq_attr "type" "o3") 3 3)
(define_function_unit "integer" 1 0
(eq_attr "type" "other") 5 5)
;; Pipeline description for z900
(include "2064.md") (include "2064.md")
;; Pipeline description for z990.
(include "2084.md") (include "2084.md")
;; Length in bytes. ;; Length in bytes.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment