* Re: [PING][PATCH][Modulo-sched] Add dump info
[not found] <OFB520DB8E.17992BA9-ONC225736F.003B27FB-C225736F.0043013B@LocalDomain>
@ 2007-10-09 14:44 ` Ayal Zaks
0 siblings, 0 replies; 4+ messages in thread
From: Ayal Zaks @ 2007-10-09 14:44 UTC (permalink / raw)
To: Revital1 Eres; +Cc: gcc-patches
Revital1 Eres/Haifa/IBM wrote on 09/10/2007 14:11:52:
> > ok, with minor comments below.
> Thanks for the comments. OK to commit the following?
>
ok.
Consider Zdenek's reorganization of dump flags patch if you plan additional
dumps:
http://gcc.gnu.org/ml/gcc-patches/2007-09/msg01742.html
Ayal.
> Revital
>
> 2007-10-09 Revital Eres <eres@il.ibm.com>
>
> * modulo-sched.c (check_nodes_order): Dump the final order of
> the nodes.
> (get_sched_window): Add dump info.
> (calculate_order_params): Dump order params of the nodes.
>
> [attachment "patch_dump_9_10.txt" deleted by Ayal Zaks/Haifa/IBM]
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PING][PATCH][Modulo-sched] Add dump info
2007-10-07 20:55 ` Ayal Zaks
@ 2007-10-09 12:11 ` Revital1 Eres
0 siblings, 0 replies; 4+ messages in thread
From: Revital1 Eres @ 2007-10-09 12:11 UTC (permalink / raw)
To: Ayal Zaks; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 382 bytes --]
> ok, with minor comments below.
Thanks for the comments. OK to commit the following?
Revital
2007-10-09 Revital Eres <eres@il.ibm.com>
* modulo-sched.c (check_nodes_order): Dump the final order of
the nodes.
(get_sched_window): Add dump info.
(calculate_order_params): Dump order params of the nodes.
(See attached file: patch_dump_9_10.txt)
[-- Attachment #2: patch_dump_9_10.txt --]
[-- Type: text/plain, Size: 4826 bytes --]
Index: modulo-sched.c
===================================================================
--- modulo-sched.c (revision 128689)
+++ modulo-sched.c (working copy)
@@ -1331,21 +1331,27 @@
print_ddg_edge (dump_file, e);
fprintf (dump_file,
"\nScheduling %d (%d) in psp_not_empty,"
- " checking node %d (%d): ", u_node->cuid,
+ " checking p %d (%d): ", u_node->cuid,
INSN_UID (u_node->insn), v_node->cuid, INSN_UID
(v_node->insn));
}
if (TEST_BIT (sched_nodes, v_node->cuid))
{
- int node_st = SCHED_TIME (v_node)
- + e->latency - (e->distance * ii);
+ int p_st = SCHED_TIME (v_node);
- early_start = MAX (early_start, node_st);
+ early_start =
+ MAX (early_start, p_st + e->latency - (e->distance * ii));
+ if (dump_file)
+ fprintf (dump_file, "pred st = %d; early_start = %d; ", p_st,
+ early_start);
+
if (e->data_type == MEM_DEP)
end = MIN (end, SCHED_TIME (v_node) + ii - 1);
}
+ else if (dump_file)
+ fprintf (dump_file, "the node is not scheduled\n");
}
start = early_start;
end = MIN (end, early_start + ii);
@@ -1372,19 +1378,22 @@
print_ddg_edge (dump_file, e);
fprintf (dump_file,
"\nScheduling %d (%d) in pss_not_empty,"
- " checking node %d (%d): ", u_node->cuid,
+ " checking s %d (%d): ", u_node->cuid,
INSN_UID (u_node->insn), v_node->cuid, INSN_UID
(v_node->insn));
}
if (TEST_BIT (sched_nodes, v_node->cuid))
{
- late_start = MIN (late_start,
- SCHED_TIME (v_node) - e->latency
- + (e->distance * ii));
- if (dump_file)
- fprintf (dump_file, "late_start = %d;", late_start);
+ int s_st = SCHED_TIME (v_node);
+ late_start = MIN (late_start,
+ s_st - e->latency + (e->distance * ii));
+
+ if (dump_file)
+ fprintf (dump_file, "succ st = %d; late_start = %d;", s_st,
+ late_start);
+
if (e->data_type == MEM_DEP)
end = MAX (end, SCHED_TIME (v_node) - ii + 1);
if (dump_file)
@@ -1430,12 +1439,22 @@
if (TEST_BIT (sched_nodes, v_node->cuid))
{
+ int p_st = SCHED_TIME (v_node);
+
early_start = MAX (early_start,
- SCHED_TIME (v_node) + e->latency
+ p_st + e->latency
- (e->distance * ii));
+
+ if (dump_file)
+ fprintf (dump_file, "pred st = %d; early_start = %d;", p_st,
+ early_start);
+
if (e->data_type == MEM_DEP)
end = MIN (end, SCHED_TIME (v_node) + ii - 1);
}
+ else if (dump_file)
+ fprintf (dump_file, "the node is not scheduled\n");
+
}
for (e = u_node->out; e != 0; e = e->next_out)
{
@@ -1454,12 +1473,22 @@
if (TEST_BIT (sched_nodes, v_node->cuid))
{
+ int s_st = SCHED_TIME (v_node);
+
late_start = MIN (late_start,
- SCHED_TIME (v_node) - e->latency
+ s_st - e->latency
+ (e->distance * ii));
+
+ if (dump_file)
+ fprintf (dump_file, "succ st = %d; late_start = %d;", s_st,
+ late_start);
+
if (e->data_type == MEM_DEP)
start = MAX (start, SCHED_TIME (v_node) - ii + 1);
}
+ else if (dump_file)
+ fprintf (dump_file, "the node is not scheduled\n");
+
}
start = MAX (start, early_start);
end = MIN (end, MIN (early_start + ii, late_start + 1));
@@ -1845,15 +1874,23 @@
sbitmap_zero (tmp);
+ if (dump_file)
+ fprintf (dump_file, "SMS final nodes order: \n");
+
for (i = 0; i < num_nodes; i++)
{
int u = node_order[i];
+ if (dump_file)
+ fprintf (dump_file, "%d ", u);
gcc_assert (u < num_nodes && u >= 0 && !TEST_BIT (tmp, u));
SET_BIT (tmp, u);
}
-
+
+ if (dump_file)
+ fprintf (dump_file, "\n");
+
sbitmap_free (tmp);
}
@@ -1993,7 +2030,18 @@
HEIGHT (e->dest) + e->latency);
}
}
+ if (dump_file)
+ {
+ fprintf (dump_file, "\nOrder params\n");
+ for (u = 0; u < num_nodes; u++)
+ {
+ ddg_node_ptr u_node = &g->nodes[u];
+ fprintf (dump_file, "node %d, ASAP: %d, ALAP: %d, HEIGHT: %d\n", u,
+ ASAP (u_node), ALAP (u_node), HEIGHT (u_node));
+ }
+ }
+
return node_order_params_arr;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PING][PATCH][Modulo-sched] Add dump info
[not found] <OFB5B60190.5BEFE35F-ONC225736D.00542A84-C225736D.00544F38@LocalDomain>
@ 2007-10-07 20:55 ` Ayal Zaks
2007-10-09 12:11 ` Revital1 Eres
0 siblings, 1 reply; 4+ messages in thread
From: Ayal Zaks @ 2007-10-07 20:55 UTC (permalink / raw)
To: Revital1 Eres; +Cc: gcc-patches
Revital1 Eres/Haifa/IBM wrote on 07/10/2007 17:20:53:
> Hello,
>
> http://gcc.gnu.org/ml/gcc-patches/2007-10/msg00117.html
>
> Thanks,
> Revital
ok, with minor comments below.
Ayal.
> Index: modulo-sched.c
> ===================================================================
> --- modulo-sched.c (revision 128689)
> +++ modulo-sched.c (working copy)
> @@ -1105,6 +1105,16 @@
> ASAP. */
> set_node_sched_params (g);
>
> + if (dump_file)
> + {
> + int i;
> +
> + fprintf (dump_file, "SMS final nodes order: \n");
> + for (i = 0; i < g->num_nodes; i++)
> + fprintf (dump_file, "%d ", node_order[i]);
> + fprintf (dump_file, "\n");
> + }
> +
Better place this at the end of sms_order_nodes, perhaps at the beginning
of check_nodes_order().
> ps = sms_schedule_by_order (g, mii, maxii, node_order);
>
> if (ps)
> @@ -1331,21 +1341,29 @@
> print_ddg_edge (dump_file, e);
> fprintf (dump_file,
> "\nScheduling %d (%d) in psp_not_empty,"
> - " checking node %d (%d): ", u_node->cuid,
> + " checking p %d (%d): ", u_node->cuid,
> INSN_UID (u_node->insn), v_node->cuid, INSN_UID
> (v_node->insn));
> }
>
> if (TEST_BIT (sched_nodes, v_node->cuid))
> {
> - int node_st = SCHED_TIME (v_node)
> - + e->latency - (e->distance * ii);
> + int p_st = SCHED_TIME (v_node);
>
> - early_start = MAX (early_start, node_st);
> + if (dump_file)
> + fprintf (dump_file, "pred st = %d; ", p_st);
>
> + early_start =
> + MAX (early_start, p_st + e->latency - (e->distance *
ii));
> +
> + if (dump_file)
> + fprintf (dump_file, "early_start = %d;", early_start);
> +
Better combine the above two printf's under one if (dump_file).
> if (e->data_type == MEM_DEP)
> end = MIN (end, SCHED_TIME (v_node) + ii - 1);
> }
> + else if (dump_file)
> + fprintf (dump_file, "the node is not scheduled\n");
> }
> start = early_start;
> end = MIN (end, early_start + ii);
> @@ -1372,19 +1390,23 @@
> print_ddg_edge (dump_file, e);
> fprintf (dump_file,
> "\nScheduling %d (%d) in pss_not_empty,"
> - " checking node %d (%d): ", u_node->cuid,
> + " checking s %d (%d): ", u_node->cuid,
> INSN_UID (u_node->insn), v_node->cuid, INSN_UID
> (v_node->insn));
> }
>
> if (TEST_BIT (sched_nodes, v_node->cuid))
> {
> - late_start = MIN (late_start,
> - SCHED_TIME (v_node) - e->latency
> - + (e->distance * ii));
> - if (dump_file)
> - fprintf (dump_file, "late_start = %d;", late_start);
> + int s_st = SCHED_TIME (v_node);
>
> + if (dump_file)
> + fprintf (dump_file, "succ st = %d; ", s_st);
> +
> + late_start = MIN (late_start,
> + s_st - e->latency + (e->distance * ii));
> + if (dump_file)
> + fprintf (dump_file, "late_start = %d;", late_start);
> +
> if (e->data_type == MEM_DEP)
> end = MAX (end, SCHED_TIME (v_node) - ii + 1);
> if (dump_file)
Better combine the above three printf's under one if (dump_file).
> @@ -1430,12 +1452,24 @@
>
> if (TEST_BIT (sched_nodes, v_node->cuid))
> {
> + int p_st = SCHED_TIME (v_node);
> +
> + if (dump_file)
> + fprintf (dump_file, "pred st = %d; ", p_st);
> +
> early_start = MAX (early_start,
> - SCHED_TIME (v_node) + e->latency
> + p_st + e->latency
> - (e->distance * ii));
> +
> + if (dump_file)
> + fprintf (dump_file, "early_start = %d;", early_start);
> +
Better combine the above two printf's under one if (dump_file).
> if (e->data_type == MEM_DEP)
> end = MIN (end, SCHED_TIME (v_node) + ii - 1);
> }
> + else if (dump_file)
> + fprintf (dump_file, "the node is not scheduled\n");
> +
> }
> for (e = u_node->out; e != 0; e = e->next_out)
> {
> @@ -1454,12 +1488,23 @@
>
> if (TEST_BIT (sched_nodes, v_node->cuid))
> {
> - late_start = MIN (late_start,
> - SCHED_TIME (v_node) - e->latency
> + int s_st = SCHED_TIME (v_node);
> +
> + if (dump_file)
> + fprintf (dump_file, "succ st = %d; ", s_st);
> +
> + late_start = MIN (late_start,
> + s_st - e->latency
> + (e->distance * ii));
> + if (dump_file)
> + fprintf (dump_file, "late_start = %d;", late_start);
> +
Better combine the above two printf's under one if (dump_file).
> if (e->data_type == MEM_DEP)
> start = MAX (start, SCHED_TIME (v_node) - ii + 1);
> }
> + else if (dump_file)
> + fprintf (dump_file, "the node is not scheduled\n");
> +
> }
> start = MAX (start, early_start);
> end = MIN (end, MIN (early_start + ii, late_start + 1));
> @@ -1993,7 +2038,15 @@
> HEIGHT (e->dest) + e->latency);
> }
> }
> + if (dump_file)
> + for (u = num_nodes - 1; u > -1; u--)
> + {
> + ddg_node_ptr u_node = &g->nodes[u];
>
> + fprintf (dump_file, "node %d, ASAP: %d, ALAP: %d, HEIGHT: %d\n",
u,
> + ASAP (u_node), ALAP (u_node), HEIGHT (u_node));
> + }
> +
Any particular reason why you prefer to print the nodes backwards?
> return node_order_params_arr;
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PING][PATCH][Modulo-sched] Add dump info
@ 2007-10-07 15:20 Revital1 Eres
0 siblings, 0 replies; 4+ messages in thread
From: Revital1 Eres @ 2007-10-07 15:20 UTC (permalink / raw)
To: Ayal Zaks; +Cc: gcc-patches
Hello,
http://gcc.gnu.org/ml/gcc-patches/2007-10/msg00117.html
Thanks,
Revital
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-09 14:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <OFB520DB8E.17992BA9-ONC225736F.003B27FB-C225736F.0043013B@LocalDomain>
2007-10-09 14:44 ` [PING][PATCH][Modulo-sched] Add dump info Ayal Zaks
[not found] <OFB5B60190.5BEFE35F-ONC225736D.00542A84-C225736D.00544F38@LocalDomain>
2007-10-07 20:55 ` Ayal Zaks
2007-10-09 12:11 ` Revital1 Eres
2007-10-07 15:20 Revital1 Eres
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).