public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@linaro.org>
To: gcc@gcc.gnu.org
Cc: zaks@il.ibm.com, eres@il.ibm.com
Subject: Question about SMS scheduling windows
Date: Wed, 27 Jul 2011 10:21:00 -0000	[thread overview]
Message-ID: <g4wrf4rq32.fsf@linaro.org> (raw)

I've been looking at SMS, and have a question about get_sched_window.
When there are previously-scheduled predessors, we use:

	      if (e->data_type == MEM_DEP)
		end = MIN (end, SCHED_TIME (v_node) + ii - 1);

to get an upper bound on the scheduling window that is permitted
by memory dependencies.  I think this:

    SCHED_TIME (v_node) + ii - 1

is an inclusive bound, in that scheduling the node at that time
would not break the memory dependence, whereas scheduling at
SCHED_TIME (v_node) would.  Is that right?

I ask because in the final range:

      start = early_start;
      end = MIN (end, early_start + ii);
      /* Schedule the node close to it's predecessors.  */
      step = 1;

END is an exclusive bound.  It seems like we might be double-counting here,
and effectively limiting the schedule to SCHED_TIME (v_node) + ii - 2.

While I'm here, I was also curious about:

      /* If there are more successors than predecessors schedule the
         node close to it's successors.  */
      if (count_succs >= count_preds)
        {
          int old_start = start;

          start = end - 1;
          end = old_start - 1;
          step = -1;
        }

This doesn't seem to be in the paper, and the comment suggests
"count_succs > count_preds" rather than "count_succs >= count_preds".
Is the ">=" vs ">" important?

Thanks,
Richard

             reply	other threads:[~2011-07-27 10:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 10:21 Richard Sandiford [this message]
2011-07-27 13:34 ` Richard Sandiford
2011-07-27 13:40 ` Revital1 Eres
2011-07-27 16:42   ` Ayal Zaks
2011-08-04  9:03     ` Richard Sandiford
2011-08-04 16:27       ` Ayal Zaks
2011-08-08  9:30         ` Richard Sandiford
2011-08-08 19:36           ` Ayal Zaks
2011-08-09 11:19             ` Richard Sandiford

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=g4wrf4rq32.fsf@linaro.org \
    --to=richard.sandiford@linaro.org \
    --cc=eres@il.ibm.com \
    --cc=gcc@gcc.gnu.org \
    --cc=zaks@il.ibm.com \
    /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).