aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/s390
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2004-06-18 14:27:25 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2004-06-18 14:27:25 +0000
commit64e1e4c4a7825964b7853402053ad5daf95487b3 (patch)
tree7e4e7162e624b2c81086dc88f681974749d7f94a /gcc/config/s390
parent06d72ee6e3ede175130413390d15726c09678cfb (diff)
downloadgcc-64e1e4c4a7825964b7853402053ad5daf95487b3.zip
gcc-64e1e4c4a7825964b7853402053ad5daf95487b3.tar.gz
gcc-64e1e4c4a7825964b7853402053ad5daf95487b3.tar.bz2
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
Diffstat (limited to 'gcc/config/s390')
-rw-r--r--gcc/config/s390/2064.md20
-rw-r--r--gcc/config/s390/s390.c56
-rw-r--r--gcc/config/s390/s390.md108
3 files changed, 28 insertions, 156 deletions
diff --git a/gcc/config/s390/2064.md b/gcc/config/s390/2064.md
index 143cd1b..a1a6d13 100644
--- a/gcc/config/s390/2064.md
+++ b/gcc/config/s390/2064.md
@@ -40,43 +40,45 @@
;; |
;; 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")
@@ -86,12 +88,12 @@
;
(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")
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index d922e94..3e2ad5a 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -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_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);
@@ -132,7 +131,7 @@ static bool s390_call_saved_register_used (tree);
#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
@@ -3902,9 +3901,6 @@ s390_agen_dep_p (rtx dep_insn, rtx insn)
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. */
@@ -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)
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
@@ -3987,23 +3964,10 @@ s390_issue_rate (void)
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;
}
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 8c37087..b6ec023 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -135,7 +135,9 @@
;; 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")))
@@ -182,107 +184,11 @@
(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.