===================================================================
@@ -9329,6 +9329,17 @@ Set the maximum number of instructions e
reassociated tree. This parameter overrides target dependent
heuristics used by default if has non zero value.
+@item sched-pressure-algorithm
+Choose between the two available implementations of
+@option{-fsched-pressure}. Algorithm 1 is the original implementation
+and is the more likely to prevent instructions from being reordered.
+Algorithm 2 was designed to be a compromise between the relatively
+conservative approach taken by algorithm 1 and the rather aggressive
+approach taken by the default scheduler. It relies more heavily on
+having a regular register file and accurate register pressure classes.
+See @file{haifa-sched.c} in the GCC sources for more details.
+
+The default choice depends on the target.
@end table
@end table
===================================================================
@@ -1665,19 +1665,6 @@ fsched-pressure
Common Report Var(flag_sched_pressure) Init(0) Optimization
Enable register pressure sensitive insn scheduling
-fsched-pressure-algorithm=
-Common Joined RejectNegative Enum(sched_pressure_algorithm) Var(flag_sched_pressure_algorithm) Init(SCHED_PRESSURE_WEIGHTED)
--fsched-pressure-algorithm=[weighted|model] Set the pressure-scheduling algorithm
-
-Enum
-Name(sched_pressure_algorithm) Type(enum sched_pressure_algorithm) UnknownError(unknown %<fsched-pressure%> algorithm %qs)
-
-EnumValue
-Enum(sched_pressure_algorithm) String(weighted) Value(SCHED_PRESSURE_WEIGHTED)
-
-EnumValue
-Enum(sched_pressure_algorithm) String(model) Value(SCHED_PRESSURE_MODEL)
-
fsched-spec
Common Report Var(flag_schedule_speculative) Init(1) Optimization
Allow speculative motion of non-loads
===================================================================
@@ -106,14 +106,6 @@ enum symbol_visibility
};
#endif
-/* The algorithm used to implement -fsched-pressure. */
-enum sched_pressure_algorithm
-{
- SCHED_PRESSURE_NONE,
- SCHED_PRESSURE_WEIGHTED,
- SCHED_PRESSURE_MODEL
-};
-
/* The algorithm used for the integrated register allocator (IRA). */
enum ira_algorithm
{
===================================================================
@@ -37,6 +37,14 @@ #define GCC_SCHED_INT_H
enum sched_pass_id_t { SCHED_PASS_UNKNOWN, SCHED_RGN_PASS, SCHED_EBB_PASS,
SCHED_SMS_PASS, SCHED_SEL_PASS };
+/* The algorithm used to implement -fsched-pressure. */
+enum sched_pressure_algorithm
+{
+ SCHED_PRESSURE_NONE,
+ SCHED_PRESSURE_WEIGHTED,
+ SCHED_PRESSURE_MODEL
+};
+
typedef VEC (basic_block, heap) *bb_vec_t;
typedef VEC (rtx, heap) *insn_vec_t;
typedef VEC (rtx, heap) *rtx_vec_t;
===================================================================
@@ -979,6 +979,12 @@ DEFPARAM (PARAM_MAX_TRACKED_STRLENS,
"track string lengths",
1000, 0, 0)
+/* Keep this in sync with the sched_pressure_algorithm enum. */
+DEFPARAM (PARAM_SCHED_PRESSURE_ALGORITHM,
+ "sched-pressure-algorithm",
+ "Which -fsched-pressure algorithm to apply",
+ 1, 1, 2)
+
/*
Local variables:
mode:c
===================================================================
@@ -6230,7 +6230,8 @@ sched_init (void)
if (flag_sched_pressure
&& !reload_completed
&& common_sched_info->sched_pass_id == SCHED_RGN_PASS)
- sched_pressure = flag_sched_pressure_algorithm;
+ sched_pressure = ((enum sched_pressure_algorithm)
+ PARAM_VALUE (PARAM_SCHED_PRESSURE_ALGORITHM));
else
sched_pressure = SCHED_PRESSURE_NONE;