From: Revital1 Eres <ERES@il.ibm.com>
To: Ayal Zaks <ZAKS@il.ibm.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PING][PATCH][Modulo-sched] Add dump info
Date: Tue, 09 Oct 2007 12:11:00 -0000 [thread overview]
Message-ID: <OFB520DB8E.17992BA9-ONC225736F.003B27FB-C225736F.0043013B@il.ibm.com> (raw)
In-Reply-To: <OF3CDD29DD.D603AB0C-ONC225736D.0070A71A-C225736D.0072FD70@il.ibm.com>
[-- 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;
}
next prev parent reply other threads:[~2007-10-09 12:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OFB5B60190.5BEFE35F-ONC225736D.00542A84-C225736D.00544F38@LocalDomain>
2007-10-07 20:55 ` Ayal Zaks
2007-10-09 12:11 ` Revital1 Eres [this message]
[not found] <OFB520DB8E.17992BA9-ONC225736F.003B27FB-C225736F.0043013B@LocalDomain>
2007-10-09 14:44 ` Ayal Zaks
2007-10-07 15:20 Revital1 Eres
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OFB520DB8E.17992BA9-ONC225736F.003B27FB-C225736F.0043013B@il.ibm.com \
--to=eres@il.ibm.com \
--cc=ZAKS@il.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).