diff options
author | Dmitry Zhurikhin <zhur@ispras.ru> | 2007-11-07 16:07:29 +0000 |
---|---|---|
committer | Andrey Belevantsev <abel@gcc.gnu.org> | 2007-11-07 19:07:29 +0300 |
commit | 5cd537421efdf71458cd1ff72968a9c41eb35b22 (patch) | |
tree | d7484c1ae7a5ee150247804e96c73dbc870644e1 | |
parent | d9c1dc68ad3646a9164ec0db28f964d289415fe8 (diff) | |
download | gcc-5cd537421efdf71458cd1ff72968a9c41eb35b22.zip gcc-5cd537421efdf71458cd1ff72968a9c41eb35b22.tar.gz gcc-5cd537421efdf71458cd1ff72968a9c41eb35b22.tar.bz2 |
modulo-sched.c (sms_order_nodes, [...]): Fix prototypes.
* modulo-sched.c (sms_order_nodes, permute_partial_schedule,
generate_prolog_epilog, duplicate_insns_of_cycles): Fix prototypes.
(calculate_order_params, sms_order_nodes): New parameter pmax_asap.
Save calculated max_asap in it.
(sms_schedule): Calculate maxii using max_asap.
Co-Authored-By: Andrey Belevantsev <abel@ispras.ru>
From-SVN: r129966
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/modulo-sched.c | 28 |
2 files changed, 23 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f93fbf3..d604a74 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2007-11-07 Dmitry Zhurikhin <zhur@ispras.ru> + Andrey Belevantsev <abel@ispras.ru> + + * modulo-sched.c (sms_order_nodes, permute_partial_schedule, + generate_prolog_epilog, duplicate_insns_of_cycles): Fix prototypes. + (calculate_order_params, sms_order_nodes): New parameter pmax_asap. + Save calculated max_asap in it. + (sms_schedule): Calculate maxii using max_asap. + 2007-11-07 Andreas Krebbel <krebbel1@de.ibm.com> * doc/invoke.texi: Replace rs6000 dfp switches -mdfp/-mno-dfp diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c index 58adb8c..282cb80 100644 --- a/gcc/modulo-sched.c +++ b/gcc/modulo-sched.c @@ -194,15 +194,14 @@ static int compute_split_row (sbitmap, int, int, int, ddg_node_ptr); static int issue_rate; -static int sms_order_nodes (ddg_ptr, int, int * result); +static int sms_order_nodes (ddg_ptr, int, int *, int *); static void set_node_sched_params (ddg_ptr); static partial_schedule_ptr sms_schedule_by_order (ddg_ptr, int, int, int *); -static void permute_partial_schedule (partial_schedule_ptr ps, rtx last); -static void generate_prolog_epilog (partial_schedule_ptr, struct loop *loop, +static void permute_partial_schedule (partial_schedule_ptr, rtx); +static void generate_prolog_epilog (partial_schedule_ptr, struct loop *, rtx, rtx); -static void duplicate_insns_of_cycles (partial_schedule_ptr ps, - int from_stage, int to_stage, - int is_prolog, rtx count_reg); +static void duplicate_insns_of_cycles (partial_schedule_ptr, + int, int, int, rtx); #define SCHED_ASAP(x) (((node_sched_params_ptr)(x)->aux.info)->asap) #define SCHED_TIME(x) (((node_sched_params_ptr)(x)->aux.info)->time) @@ -866,7 +865,7 @@ sms_schedule (void) rtx insn; ddg_ptr *g_arr, g; int * node_order; - int maxii; + int maxii, max_asap; loop_iterator li; partial_schedule_ptr ps; basic_block bb = NULL; @@ -1093,9 +1092,9 @@ sms_schedule (void) node_order = XNEWVEC (int, g->num_nodes); mii = 1; /* Need to pass some estimate of mii. */ - rec_mii = sms_order_nodes (g, mii, node_order); + rec_mii = sms_order_nodes (g, mii, node_order, &max_asap); mii = MAX (res_MII (g), rec_mii); - maxii = MAXII_FACTOR * mii; + maxii = MAX (max_asap, MAXII_FACTOR * mii); if (dump_file) fprintf (dump_file, "SMS iis %d %d %d (rec_mii, mii, maxii)\n", @@ -1851,7 +1850,7 @@ typedef struct node_order_params * nopa; static void order_nodes_of_sccs (ddg_all_sccs_ptr, int * result); static int order_nodes_in_scc (ddg_ptr, sbitmap, sbitmap, int*, int); -static nopa calculate_order_params (ddg_ptr, int mii); +static nopa calculate_order_params (ddg_ptr, int, int *); static int find_max_asap (ddg_ptr, sbitmap); static int find_max_hv_min_mob (ddg_ptr, sbitmap); static int find_max_dv_min_mob (ddg_ptr, sbitmap); @@ -1896,15 +1895,15 @@ check_nodes_order (int *node_order, int num_nodes) /* Order the nodes of G for scheduling and pass the result in NODE_ORDER. Also set aux.count of each node to ASAP. - Return the recMII for the given DDG. */ + Put maximal ASAP to PMAX_ASAP. Return the recMII for the given DDG. */ static int -sms_order_nodes (ddg_ptr g, int mii, int * node_order) +sms_order_nodes (ddg_ptr g, int mii, int * node_order, int *pmax_asap) { int i; int rec_mii = 0; ddg_all_sccs_ptr sccs = create_ddg_all_sccs (g); - nopa nops = calculate_order_params (g, mii); + nopa nops = calculate_order_params (g, mii, pmax_asap); if (dump_file) print_sccs (dump_file, sccs, g); @@ -1979,7 +1978,7 @@ order_nodes_of_sccs (ddg_all_sccs_ptr all_sccs, int * node_order) /* MII is needed if we consider backarcs (that do not close recursive cycles). */ static struct node_order_params * -calculate_order_params (ddg_ptr g, int mii ATTRIBUTE_UNUSED) +calculate_order_params (ddg_ptr g, int mii ATTRIBUTE_UNUSED, int *pmax_asap) { int u; int max_asap; @@ -2042,6 +2041,7 @@ calculate_order_params (ddg_ptr g, int mii ATTRIBUTE_UNUSED) } } + *pmax_asap = max_asap; return node_order_params_arr; } |