public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
To: gcc-bugzilla@gcc.gnu.org
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: [Bug middle-end/28071] [4.1 regression] A file that can not be  compiled in reasonable time/space
Date: Mon, 15 Jan 2007 07:52:00 -0000	[thread overview]
Message-ID: <45AB32C7.20904@ispras.ru> (raw)
In-Reply-To: <20070115071909.29016.qmail@sourceware.org>

Thanks!  Very useful comments.  I'm continuing to work on cleaning the 
patch (especially on writing the comments) and making code more 
transparent.  Below are my comments on yours:

zaks at il dot ibm dot com wrote:
> ------- Comment #56 from zaks at il dot ibm dot com  2007-01-15 07:19 -------
> (In reply to comment #55)
>> Created an attachment (id=12879)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12879&action=view) [edit]
>> Patch for scheduler dependency lists.
> 
> Looks like a pretty good cleanup IMHO. Here are some comments.
> 
> o dep_def: representing a dependence edge including both producer and consumer
> is very handy, albeit somewhat redundant as we're usually traversing all cons
> connected to a pro or vice versa.
This allows us to keep all things in one place - one of the things 
current deps don't provide.  I.e., when changing some property of the 
dep we need to find a corresponding to that dep nodes in both backward 
and forward lists and apply the change to two places instead of one.

  (I.e., has its pros and cons, but mostly pros
> I agree - also done in ddg.h/ddg_edge.) Maybe comment why both 'kind' and 'ds'
> are needed, as one supersedes the other.
There will be.  Thanks.

> 
> o dep_node_def: this is a node in a (doubly-linked) chain, but it represents an
> *edge* in terms of the data-dependence graph. The prev_nextp field is a "/*
Right!  I struggled to figure out the correct name and didn't prevail. 
Thanks for the tip.  It'll be dep_edge.

> Pointer to the next field of the previous node in the list.  */" except for the
> first node on the list, whose prev_nextp points to itself, right?
No.  Prev_nextp field of the first node points to deps_list->first. 
This allows us not to distinguish first node from the others.  I'll fix 
the comment.

> 
> o dep_data_node_def: holding the two conjugate dependence edges together is
> very useful when switching directions. But perhaps most of the accesses go in
> one direction (e.g. iterating over cons of a pro), and having both conjugates
> structed together may reduce cache efficiency. So you may consider connecting
> each dep_node_def to its conjugate, not necessarily forcing them to be placed
> adjacent in memory.
Dep_def and both edges were placed in one structure so that they could 
be allocated and freed within a single alloc/free.  As I understand you 
propose putting two pointers inside dep_edge_def: one to the dep_def and 
one to the opposite edge.  Currently we have one pointer in dep_edge_def 
to the dep_data_node which have all that pointers.  And probably I'm 
missing something, but I don't see how your way can improve cache 
efficiency.

> 
> o To add to the checking routines, the following can be checked: every
> dep_node_def is pointed-to by either its data->back xor its data->forw, right?
> If so, this can be used to identify if a dep_node_def is forward or backward;
> that all nodes on a list are forward (and share the same pro) or backward (and
> share the same con); and to assert the following regarding L:
> +/* Add a dependency described by DEP to the list L.
> +   L should be either INSN_DEPS1 or RESOLVED_DEPS1.  */
Good idea.

> 
> o insn_cost (insn, dep): maybe it's better to break this into insn_cost (insn)
> of a producer regardless of consumers, and "dep_cost (dep)".
Agree.

> 
> o The comment explaining what 'resolve_dep' does can be inlined together with
> its code. 
Agree.

> 
> +/* Detach dep_node N from the list.  */
> +static void
> +dep_node_detach (dep_node_t n)
> +{
> +  dep_node_t *prev_nextp = DEP_NODE_PREV_NEXTP (n);
> +  dep_node_t next = DEP_NODE_NEXT (n);
> +
> +  *prev_nextp = next;
> +
> +  if (next != NULL)
> +    DEP_NODE_PREV_NEXTP (next) = prev_nextp;
> maybe complete the detachment by adding:
> DEP_NODE_PREV_NEXTP (n) = NULL;
> DEP_NODE_NEXT (n) = NULL;
Probably, you are right.

> Ayal.

Thanks,

Maxim



  reply	other threads:[~2007-01-15  7:52 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-17  9:27 [Bug c/28071] New: " raffalli at univ-savoie dot fr
2006-06-17  9:52 ` [Bug c/28071] " raffalli at univ-savoie dot fr
2006-06-17 10:57 ` steven at gcc dot gnu dot org
2006-06-17 11:06 ` steven at gcc dot gnu dot org
2006-06-17 14:30 ` steven at gcc dot gnu dot org
2006-06-17 14:56 ` [Bug middle-end/28071] [4.2 regression] " pinskia at gcc dot gnu dot org
2006-06-17 18:42 ` [Bug middle-end/28071] [4.1/4.2 " rguenth at gcc dot gnu dot org
2006-06-17 19:24 ` [Bug rtl-optimization/28071] " rguenth at gcc dot gnu dot org
2006-06-19  8:56 ` raffalli at univ-savoie dot fr
2006-07-17  2:45 ` mmitchel at gcc dot gnu dot org
2006-07-21 21:12 ` hubicka at gcc dot gnu dot org
2006-07-21 22:01 ` raffalli at univ-savoie dot fr
2006-07-22 13:47 ` hubicka at ucw dot cz
2006-07-22 17:13 ` hubicka at ucw dot cz
2006-07-22 18:09 ` hubicka at ucw dot cz
2006-07-22 19:30 ` hubicka at ucw dot cz
2006-07-22 20:51   ` Jan Hubicka
2006-07-22 20:51 ` hubicka at ucw dot cz
2006-07-24  0:05 ` patchapp at dberlin dot org
2006-07-24 11:24 ` hubicka at gcc dot gnu dot org
2006-07-24 11:28 ` hubicka at gcc dot gnu dot org
2006-07-24 11:54 ` hubicka at gcc dot gnu dot org
2006-07-25 18:20 ` patchapp at dberlin dot org
2006-07-26 22:52 ` hubicka at gcc dot gnu dot org
2006-07-27  7:15 ` patchapp at dberlin dot org
2006-07-27  7:20 ` patchapp at dberlin dot org
2006-07-27  7:25 ` patchapp at dberlin dot org
2006-07-27  8:00 ` patchapp at dberlin dot org
2006-07-27 16:02 ` hubicka at gcc dot gnu dot org
2006-07-27 16:03 ` hubicka at gcc dot gnu dot org
2006-07-27 17:10 ` hubicka at gcc dot gnu dot org
2006-07-28  9:30 ` patchapp at dberlin dot org
2006-07-28  9:41 ` hubicka at ucw dot cz
2006-07-29 13:15 ` hubicka at gcc dot gnu dot org
2006-07-30  5:45 ` patchapp at dberlin dot org
2006-08-11  7:17 ` ebotcazou at gcc dot gnu dot org
2006-08-16 21:25 ` [Bug middle-end/28071] " rakdver at gcc dot gnu dot org
2006-08-18 23:10 ` hubicka at ucw dot cz
2006-08-19  0:19 ` hubicka at ucw dot cz
2006-08-19  1:52 ` hubicka at ucw dot cz
2006-08-19 21:58 ` amacleod at redhat dot com
2006-08-20  0:58   ` Jan Hubicka
2006-08-20  0:59 ` hubicka at ucw dot cz
2006-08-21  0:00 ` hubicka at gcc dot gnu dot org
2006-08-21  1:42 ` hubicka at gcc dot gnu dot org
2006-08-21  2:59   ` Jan Hubicka
2006-08-21  2:59 ` hubicka at ucw dot cz
2006-08-21 12:56 ` hubicka at ucw dot cz
2006-08-21 17:11 ` hubicka at ucw dot cz
2006-08-25  1:37 ` amacleod at redhat dot com
2006-08-25  1:43 ` amacleod at redhat dot com
2006-08-25  1:57 ` amacleod at redhat dot com
2006-08-28 17:18 ` amacleod at gcc dot gnu dot org
2006-08-28 17:37 ` amacleod at redhat dot com
2006-09-12 10:11 ` hubicka at gcc dot gnu dot org
2006-09-23  9:44 ` steven at gcc dot gnu dot org
2006-09-23 10:22 ` [Bug middle-end/28071] [4.1 " rguenth at gcc dot gnu dot org
2007-01-10 11:43 ` mkuvyrkov at gcc dot gnu dot org
2007-01-15  7:19 ` zaks at il dot ibm dot com
2007-01-15  7:52   ` Maxim Kuvyrkov [this message]
2007-01-15  7:53 ` mkuvyrkov at ispras dot ru
2007-01-15 15:31 ` zaks at il dot ibm dot com
2007-01-18  9:52 ` hubicka at ucw dot cz
2007-02-06 22:05 ` hubicka at gcc dot gnu dot org
2007-02-06 22:15 ` hubicka at gcc dot gnu dot org
2007-03-26 15:50 ` bonzini at gnu dot org
2007-04-16 15:04 ` mkuvyrkov at gcc dot gnu dot org
2007-04-16 15:07 ` mkuvyrkov at gcc dot gnu dot org
2007-04-17 18:16 ` hubicka at gcc dot gnu dot org
2007-04-17 18:38 ` hubicka at ucw dot cz
2007-05-14 21:37 ` mmitchel at gcc dot gnu dot org
2007-05-14 21:49 ` fang at csl dot cornell dot edu
2007-07-20  3:47 ` mmitchel at gcc dot gnu dot org
2007-10-09 19:25 ` mmitchel at gcc dot gnu dot org
2007-11-03  8:07 ` ebotcazou at gcc dot gnu dot org
     [not found] <bug-28071-4@http.gcc.gnu.org/bugzilla/>
2023-07-28  8:40 ` cvs-commit at gcc dot gnu.org

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=45AB32C7.20904@ispras.ru \
    --to=mkuvyrkov@ispras.ru \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-bugzilla@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).