public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Jerry Quinn" <jquinn@nortelnetworks.com>
To: law@cygnus.com
Cc: Richard Henderson <rth@cygnus.com>, egcs@egcs.cygnus.com
Subject: Re: Fwd: Questions on PA machine description?
Date: Wed, 31 Mar 1999 23:46:00 -0000	[thread overview]
Message-ID: <36F96A7D.F0DBDF47@americasm01.nt.com> (raw)
Message-ID: <19990331234600.LIMQ98xi0C4koqsDOfd49qV3kTarJCa-w29OaxwKmOg@z> (raw)
In-Reply-To: <736.922266794@upchuck>

Jeffrey A Law wrote:
> 
>   In message < 36F811ED.32912006@americasm01.nt.com >you write:
>   > I started trying to look at the haifa_sched.c file.  I can't really see
>   > where insns dependent on the current one in the ready queue are
>   > removed.  I'm looking in the loop on ready[] in schedule_block().  My
>   > guess is that somehow schedule_insn does this, but I'm not sure.
> Yes.
> 
> schedule_insn walks over the INSN_DEPEND list and decrements the dependency
> count for all the instructions which are dependent on INSN.  If the dependency
> count goes to zero, then the dependent insn is added to the ready queue.
> 
>   for (link = INSN_DEPEND (insn); link != 0; link = XEXP (link, 1))
>     {
>       rtx next = XEXP (link, 0);
>       int cost = insn_cost (insn, link, next);
> 
>       INSN_TICK (next) = MAX (INSN_TICK (next), clock + cost);
> 
>       if ((INSN_DEP_COUNT (next) -= 1) == 0)
>         {
> [ ... ]
>           /* Adjust the priority of NEXT and either put it on the ready
>              list or queue it.  */
>           adjust_priority (next);
>           if (effective_cost <= 1)
>             ready[n_ready++] = next;
>           else
>             queue_insn (next, effective_cost);
>         }

So the ready list for a cycle starts out with insns with no
dependencies.  Then when we pick an insn off the ready list, it's placed
into the scheduled chain and schedule_insn is called.

OK, now I'm confused, because in my head it looks like the code should
already do what you want.  schedule_insn is called as soon as we
schedule an insn from the ready list.  So, if we have a dependent insn,
such as the lo_sum following a sethi, the dependency would now be
reduced to 0, and it becomes eligible for the lower part of the code. 
So as long as effective_cost is OK, it would be added to the ready
queue.  INSN_DEPEND is the list of insns that depend on the one being
scheduled, right?

Since this doesn't happen, I'm obviously missing something.

If the alu has 0 delay, insn_cost would return 0?  Then, INSN_TICK would
be unchanged.  And effective_cost would end up 0, causing the dependent
insn to be placed into ready.

I'm babbling again and confused.  Enough for today :-)

Jerry


-- 
Jerry Quinn                             Tel: (514) 761-8737
jquinn@nortelnetworks.com               Fax: (514) 761-8505
Speech Recognition Research

  reply	other threads:[~1999-03-31 23:46 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-08  6:49 Jerry Quinn
     [not found] ` < 36E3E35A.4BB420BE@americasm01.nt.com >
1999-03-08 20:48   ` Jeffrey A Law
1999-03-09 11:35     ` Jerry Quinn
     [not found]       ` < 36E577DF.F825BAFB@americasm01.nt.com >
1999-03-09 12:18         ` Jeffrey A Law
1999-03-16 10:49           ` Jerry Quinn
     [not found]             ` < 36EEA7B6.D3C894DE@americasm01.nt.com >
1999-03-17 20:12               ` Jeffrey A Law
1999-03-18 14:35                 ` Jerry Quinn
     [not found]                   ` < 36F17F8C.9FD937FA@americasm01.nt.com >
1999-03-18 21:00                     ` Jeffrey A Law
     [not found]                       ` < 18375.921819620@hurl.cygnus.com >
1999-03-19 17:32                         ` Richard Henderson
     [not found]                           ` < 19990319173226.C14722@cygnus.com >
1999-03-20  2:08                             ` Jeffrey A Law
     [not found]                               ` < 1843.921916006@upchuck >
1999-03-20 10:43                                 ` Richard Henderson
1999-03-23 14:13                                   ` Jerry Quinn
     [not found]                                     ` < 36F811ED.32912006@americasm01.nt.com >
1999-03-24  1:30                                       ` Jeffrey A Law
1999-03-24 14:44                                         ` Jerry Quinn [this message]
     [not found]                                           ` < 36F96A7D.F0DBDF47@americasm01.nt.com >
1999-03-25  1:01                                             ` Jeffrey A Law
     [not found]                                               ` < 4324.922351870@upchuck >
1999-03-25 13:56                                                 ` Richard Henderson
1999-03-25 15:10                                                   ` Richard Henderson
1999-03-26 10:50                                                     ` Jerry Quinn
1999-03-26 11:04                                                       ` Richard Henderson
1999-03-31 23:46                                                         ` Richard Henderson
1999-03-31 23:46                                                       ` Jerry Quinn
1999-03-26 14:07                                                     ` Jerry Quinn
1999-03-27 16:04                                                       ` Jeffrey A Law
1999-03-31 23:46                                                         ` Jeffrey A Law
1999-03-31 23:46                                                       ` Jerry Quinn
1999-03-31 23:46                                                     ` Richard Henderson
1999-04-02 11:53                                                     ` Jeffrey A Law
1999-04-05 15:50                                                       ` Jerry Quinn
1999-04-30 23:15                                                         ` Jerry Quinn
1999-04-30 23:15                                                       ` Jeffrey A Law
1999-03-31 23:46                                                   ` Richard Henderson
1999-03-31 23:46                                               ` Jeffrey A Law
1999-03-31 23:46                                           ` Jerry Quinn
1999-03-31 23:46                                         ` Jeffrey A Law
1999-03-31 23:46                                     ` Jerry Quinn
1999-03-31 23:46                                   ` Richard Henderson
1999-03-31 23:46                               ` Jeffrey A Law
1999-03-31 23:46                           ` Richard Henderson
1999-03-31 23:46                       ` Jeffrey A Law
1999-03-31 23:46                   ` Jerry Quinn
1999-03-31 23:46                 ` Jeffrey A Law
1999-03-17 20:14               ` Jeffrey A Law
1999-03-31 23:46                 ` Jeffrey A Law
1999-03-31 23:46             ` Jerry Quinn
1999-03-31 23:46           ` Jeffrey A Law
1999-03-31 23:46       ` Jerry Quinn
1999-03-31 23:46     ` Jeffrey A Law
1999-03-31 23:46 ` Jerry Quinn

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=36F96A7D.F0DBDF47@americasm01.nt.com \
    --to=jquinn@nortelnetworks.com \
    --cc=egcs@egcs.cygnus.com \
    --cc=law@cygnus.com \
    --cc=rth@cygnus.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).