* 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
+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>
Diego Novillo <dnovillo@redhat.com>
;; |
;; wr
+;; This scheduler description is also used for the g5 and g6.
+
(define_automaton "z_ipu")
(define_cpu_unit "z_e1" "z_ipu")
(define_cpu_unit "z_wr" "z_ipu")
(define_insn_reservation "z_la" 1
- (and (eq_attr "cpu" "z900")
+ (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "la"))
"z_e1,z_wr")
(define_insn_reservation "z_larl" 1
- (and (eq_attr "cpu" "z900")
+ (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "larl"))
"z_e1,z_wr")
(define_insn_reservation "z_load" 1
- (and (eq_attr "cpu" "z900")
+ (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "load"))
"z_e1,z_wr")
(define_insn_reservation "z_store" 1
- (and (eq_attr "cpu" "z900")
+ (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "store"))
"z_e1,z_wr")
(define_insn_reservation "z_call" 5
- (and (eq_attr "cpu" "z900")
+ (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "jsr"))
"z_e1*5,z_wr")
(define_insn_reservation "z_o2" 2
- (and (eq_attr "cpu" "z900")
+ (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "o2"))
"z_e1*2,z_wr")
(define_insn_reservation "z_o3" 3
- (and (eq_attr "cpu" "z900")
+ (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "type" "o3"))
"z_e1*3,z_wr")
;
(define_insn_reservation "z_int" 1
- (and (eq_attr "cpu" "z900")
+ (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "atype" "reg"))
"z_e1,z_wr")
(define_insn_reservation "z_agen" 1
- (and (eq_attr "cpu" "z900")
+ (and (eq_attr "cpu" "z900,g5,g6")
(eq_attr "atype" "agen"))
"z_e1,z_wr")
static int s390_adjust_cost (rtx, rtx, rtx, int);
static int s390_adjust_priority (rtx, int);
static int s390_issue_rate (void);
-static int s390_use_dfa_pipeline_interface (void);
static int s390_first_cycle_multipass_dfa_lookahead (void);
static bool s390_rtx_costs (rtx, int, int, int *);
static int s390_address_cost (rtx);
#undef TARGET_SCHED_ISSUE_RATE
#define TARGET_SCHED_ISSUE_RATE s390_issue_rate
#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
#define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD s390_first_cycle_multipass_dfa_lookahead
static int
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
output dependence, there is sometimes a cost, but it doesn't seem
worth handling those few cases. */
if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0)
return cost;
- /* DFA based scheduling checks address dependency in md file. */
- if (s390_use_dfa_pipeline_interface ())
- {
- /* Operand forward in case of lr, load and la. */
- if (s390_tune == PROCESSOR_2084_Z990
- && cost == 1
- && (s390_safe_attr_type (dep_insn) == TYPE_LA
- || 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;
- }
- }
-
+ /* Operand forward in case of lr, load and la. */
+ if (s390_tune == PROCESSOR_2084_Z990
+ && cost == 1
+ && (s390_safe_attr_type (dep_insn) == TYPE_LA
+ || s390_safe_attr_type (dep_insn) == TYPE_LR
+ || s390_safe_attr_type (dep_insn) == TYPE_LOAD))
+ return 0;
return cost;
}
+
/* A C statement (sans semicolon) to update the integer scheduling priority
INSN_PRIORITY (INSN). Increase the priority to execute the INSN earlier,
reduce the priority to execute INSN later. Do not define this macro if
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
s390_first_cycle_multipass_dfa_lookahead (void)
{
- return s390_use_dfa_pipeline_interface () ? 4 : 0;
+ return 4;
}
;; 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"
(const (symbol_ref "s390_tune")))
(eq_attr "op_type" "SIY") (const_string "agen")]
(const_string "reg")))
-;; Generic pipeline function unit.
-
-(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
-
+;; Pipeline description for z900. For lack of anything better,
+;; this description is also used for the g5 and g6.
(include "2064.md")
+
+;; Pipeline description for z990.
(include "2084.md")
;; Length in bytes.