89 lines
3.0 KiB
Diff
89 lines
3.0 KiB
Diff
This backport contains 1 patch from gcc main stream tree.
|
|
The commit id of these patchs list as following in the order of time.
|
|
|
|
0001-arm-aarch64-Handle-no_insn-in-TARGET_SCHED_VARIABLE_.patch
|
|
d0bc0cb66bcb0e6a5a5a31a9e900e8ccc98e34e5
|
|
|
|
diff -Nurp a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
|
|
--- a/gcc/config/aarch64/aarch64.c 2020-09-03 15:54:20.136000000 +0800
|
|
+++ b/gcc/config/aarch64/aarch64.c 2020-09-03 15:55:22.736000000 +0800
|
|
@@ -11044,6 +11044,23 @@ aarch64_sched_issue_rate (void)
|
|
return aarch64_tune_params.issue_rate;
|
|
}
|
|
|
|
+/* Implement TARGET_SCHED_VARIABLE_ISSUE. */
|
|
+static int
|
|
+aarch64_sched_variable_issue (FILE *, int, rtx_insn *insn, int more)
|
|
+{
|
|
+ if (DEBUG_INSN_P (insn))
|
|
+ return more;
|
|
+
|
|
+ rtx_code code = GET_CODE (PATTERN (insn));
|
|
+ if (code == USE || code == CLOBBER)
|
|
+ return more;
|
|
+
|
|
+ if (get_attr_type (insn) == TYPE_NO_INSN)
|
|
+ return more;
|
|
+
|
|
+ return more - 1;
|
|
+}
|
|
+
|
|
static int
|
|
aarch64_sched_first_cycle_multipass_dfa_lookahead (void)
|
|
{
|
|
@@ -19428,6 +19445,9 @@ aarch64_libgcc_floating_mode_supported_p
|
|
#undef TARGET_SCHED_ISSUE_RATE
|
|
#define TARGET_SCHED_ISSUE_RATE aarch64_sched_issue_rate
|
|
|
|
+#undef TARGET_SCHED_VARIABLE_ISSUE
|
|
+#define TARGET_SCHED_VARIABLE_ISSUE aarch64_sched_variable_issue
|
|
+
|
|
#undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD
|
|
#define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD \
|
|
aarch64_sched_first_cycle_multipass_dfa_lookahead
|
|
diff -Nurp a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
|
|
--- a/gcc/config/arm/arm.c 2020-09-03 15:54:20.100000000 +0800
|
|
+++ b/gcc/config/arm/arm.c 2020-09-03 15:55:22.740000000 +0800
|
|
@@ -258,6 +258,7 @@ static bool arm_sched_can_speculate_insn
|
|
static bool arm_macro_fusion_p (void);
|
|
static bool arm_cannot_copy_insn_p (rtx_insn *);
|
|
static int arm_issue_rate (void);
|
|
+static int arm_sched_variable_issue (FILE *, int, rtx_insn *, int);
|
|
static int arm_first_cycle_multipass_dfa_lookahead (void);
|
|
static int arm_first_cycle_multipass_dfa_lookahead_guard (rtx_insn *, int);
|
|
static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
|
|
@@ -666,6 +667,9 @@ static const struct attribute_spec arm_a
|
|
#undef TARGET_SCHED_ISSUE_RATE
|
|
#define TARGET_SCHED_ISSUE_RATE arm_issue_rate
|
|
|
|
+#undef TARGET_SCHED_VARIABLE_ISSUE
|
|
+#define TARGET_SCHED_VARIABLE_ISSUE arm_sched_variable_issue
|
|
+
|
|
#undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD
|
|
#define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD \
|
|
arm_first_cycle_multipass_dfa_lookahead
|
|
@@ -28316,6 +28320,23 @@ arm_issue_rate (void)
|
|
return current_tune->issue_rate;
|
|
}
|
|
|
|
+/* Implement TARGET_SCHED_VARIABLE_ISSUE. */
|
|
+static int
|
|
+arm_sched_variable_issue (FILE *, int, rtx_insn *insn, int more)
|
|
+{
|
|
+ if (DEBUG_INSN_P (insn))
|
|
+ return more;
|
|
+
|
|
+ rtx_code code = GET_CODE (PATTERN (insn));
|
|
+ if (code == USE || code == CLOBBER)
|
|
+ return more;
|
|
+
|
|
+ if (get_attr_type (insn) == TYPE_NO_INSN)
|
|
+ return more;
|
|
+
|
|
+ return more - 1;
|
|
+}
|
|
+
|
|
/* Return how many instructions should scheduler lookahead to choose the
|
|
best one. */
|
|
static int
|