public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: df.c and partial writes/REG_EQUAL notes
@ 2001-09-27 11:48 Richard Kenner
  0 siblings, 0 replies; 32+ messages in thread
From: Richard Kenner @ 2001-09-27 11:48 UTC (permalink / raw)
  To: dan; +Cc: gcc

    A review of a patch tells you what is necessary to make it acceptable
    for gcc. Not whether a particular person with global write access
    likes it.

"Whether a particular person with global write access likes it" is supposed
to be equivalent to whether "it's acceptable for GCC".

    This is not a review of the patch itself. It is a statement about the
    approach to the problem the patch takes.

Of course, but if that approach is deemed wrong, the patch itself is
irrelevant and it's a waste of time to go into details with it.

    Everyone agrees the approach to the actual problem the patch
    implements is wrong, regardless of the implementation details or
    quality of the patch.
    This is not one of those cases.

It sounded like it was to me. 

    Somebody should, of course, review each patch.  Unless *everyone*
    agrees the actual approach to solving the problem is wrong.

No, that's not the way it works.  Saying the approach is wrong *is* a
review.  Indeed, the first part of a review is to check the approach.
If the approach is wrong, then there's no point in going further.

    It all goes back to whether a statement like "we shouldn't have 3
    bitmap implementations" is a review of the patch.  

I believe it is.

    > However, I agree with RTH that we don't need *three* bitmap
    > implementations.

    Not that i disagree, i'm just curious why?

Essentially because it makes the compiler more complicated.  There are the
opportunities for bugs, three implementations to understand, and three to
choose from when somebody needs a bitmap.

    What is it about bitmaps that makes you think two is enough?
    The right representation for a given set of problems is more important
    than the number of representations.
    In fact, it's often vital.

If you can explain where there are three different sets of properties of the
data that hence require three different implementations, then I'd consider
that three may be the right number.

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: df.c and partial writes/REG_EQUAL notes
@ 2001-09-27 14:16 mike stump
  0 siblings, 0 replies; 32+ messages in thread
From: mike stump @ 2001-09-27 14:16 UTC (permalink / raw)
  To: dan, kenner; +Cc: gcc

> To: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
> Cc: dan@cgsoftware.com, gcc@gcc.gnu.org
> From: Daniel Berlin <dan@cgsoftware.com>
> Date: Thu, 27 Sep 2001 14:41:38 -0400

> A review of a patch tells you what is necessary to make it acceptable
> for gcc. Not whether a particular person with global write access
> likes it.

I don't see anything evidence that what was done was wrong.  I can't
help but wonder if your expectations of what the process is is flawed
or deficient.  I think you have many unreasonable expectations.

I don't see it as wrong for a maintainer to offer a partial review of
a patch instead of a complete review of the patch.  I don't see it as
wrong if a maintainer only states what you consider is just his
opinion of a patch.  I don't see it as wrong if a maintainer misses a
deficiency of a patch.  I don't see it as wrong if a maintainer uses
different definitions of patch, review, code, correct, or compiler
from you...  I don't see it as wrong if a maintainer doesn't review
a patch.

> Note that a review of the patch would have noticed the documentation
> was deficient.  This is what would make the patch acceptable, for
> the most part, (at least in this case), to other global write
> people.

If that is the case, why are we having this discussion?  Fix the
documentation and have have it accepted.  We can be sure this is the
case, after you do it.

> It is a statement that gives you some indication as to whether
> or not they will review that patch. It is not a review in and of
> itself.

Sounds like a semantic game.  Feel free to submit changes to the web
site that desribe what you discover the process is, so that you will
believe the words are accurate.

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: df.c and partial writes/REG_EQUAL notes
@ 2001-09-27  8:52 Richard Kenner
  2001-09-27 10:20 ` Jan Hubicka
  2001-09-27 11:41 ` Daniel Berlin
  0 siblings, 2 replies; 32+ messages in thread
From: Richard Kenner @ 2001-09-27  8:52 UTC (permalink / raw)
  To: dan; +Cc: gcc

    Saying "I don't think we need 3 bitmap implemenations" is not a
    review of a patch.

If the patch in question adds a third bitmap implementation, it *is* a review
of the patch.

If somebody submits a patch based on a concept with which I disagree and I
review the patch, I'll just say that I don't think the concept behind the
patch is reasonable.  In that case, there's no reason to delve further into
the details of the patch, including the quality of the documentation.

    Overall direction and whatnot of the compiler is not controlled by
    [a specific global-write privilege maintainer], it's controlled by the
    steering committee.

True, but the SC has made it clear they do not want to get involved in the
review process of individual patches, only in setting that process, which is
that *somebody* with global write privileges must be convinced to approve the
patch.  In the case of a *major* issue, I agree it's appropriate to raise it
with the SC, but I doubt the SC wants to get involved at this level of
technical detail.

As to my opinion of the underlying issue, I'll say first that I have not
looked at the patch.  However, I agree with RTH that we don't need *three*
bitmap implementations.  That being said, however, I could be convinced that
a patch that added one was reasonable *if* I was convinced that this
implementation was vastly superior in some way *and* that there was a clear
path towards going back to two (or, better yet, one) such implmentation and I
trusted the submitter to do that.  Note that the last criteria means that I
(and presumably others) would have different opinions on the issue based on
the GCC development history of the submitter.

^ permalink raw reply	[flat|nested] 32+ messages in thread
* df.c and partial writes/REG_EQUAL notes
@ 2001-09-25  7:16 Jan Hubicka
  2001-09-25  7:55 ` Daniel Berlin
  2001-10-24 12:35 ` law
  0 siblings, 2 replies; 32+ messages in thread
From: Jan Hubicka @ 2001-09-25  7:16 UTC (permalink / raw)
  To: gcc, rth, m.hayes, matzmich, dan

Hi,
yesterday I wanted to make myself familiar with the dataflow module and write
simple code to construct webs early and split each pseudo consisting of multiple
webs to assist CSE and other optimizations.  What I am shooting for is to replace
some of logic of unroll.c to make it more rewritable for CFG.  For instance code like
*a++=0;
*a++=0;
*a++=0;
*a++=0;
*a++=0;
Will currently use 5 increments, but if the various copies of A are split, the
CSE/combine takes care to construct multiple moves.

Problem 1
=========

I've run into problems with dataflow analyzis and partial writes.  For instance following
code:

1: (set (reg:DI x) (const_int 0))

2: (set (subreg:SI (reg:DI x) 0) (const_int 1))

3: (use somewhere reg:DI x)

As currently impleemnted in df.c, there will be no depdendancy between insn 1 and insn 3,
as the store in insn 2 is believed to kill whole value of X.
The semantic of insn 2 is to overwruite just first word of the value so the insn 3 uses
values of both instructions.

I am attaching an work-in-progress patch, that changes the behaviour to represent the
depdendancy between insn 1 and insn 2 and mark the definition in insn 2 as read/write,
as well as the use in insn 2, so my web code can realize the fact that the register
must be equal and I can merge webs for X in insns 1-2 and X in insns 2-3 otherwise
disjunct.

In same way I get read/write for strict_low_part

There are number of hacks around the code, as I understand designed to cooperate somehow
with register allocator, but I am not 100% sure how.  Would be the approach described good
enought?

Alternativly we may want to make dataflow more smart and realize that insn 2 does not
use value of insn 1, but insn 3 uses both, but I am not quite sure it is wortwhile,
as pass who wants to be aware of this should also know that insn 1 can't be placed
after insn 2, even when the insn 2 does not use the value nor does kill the value
defined by insn 1.

What do you think is the most suitable behaviour?

Problem 2
=========

Another problem I've run into are the REG_EQUAL/EQUIV notes.  Currently dataflow
ignores them, but attempts to update them when register is replaced, but this is quite
wrong, as the insn may not mention the register in the pattern, but still may contain
it in the REG_EQUIV note.  This is common in libcall sequences and similar stuff.

I've added an option to build dataflow with REG_EQUIV/EQUAL notes reprezented as
ordinally uses.

Does that sound sane?
With my new "flags" field I've introduced for the problem 1, I can even mark them,
so the eventual passes may ignore them in some cases - does that make sense for
register allocator (as it is probably only one who will do so).

I am attaching the patch as well as the webizer code, both kind of work-in-progress.

Honza

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2001-10-25 11:20 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-27 11:48 df.c and partial writes/REG_EQUAL notes Richard Kenner
  -- strict thread matches above, loose matches on Subject: below --
2001-09-27 14:16 mike stump
2001-09-27  8:52 Richard Kenner
2001-09-27 10:20 ` Jan Hubicka
2001-09-27 15:11   ` Daniel Berlin
2001-09-27 11:41 ` Daniel Berlin
2001-09-25  7:16 Jan Hubicka
2001-09-25  7:55 ` Daniel Berlin
2001-09-25  7:59   ` Jan Hubicka
2001-09-25  8:33     ` Daniel Berlin
2001-09-25  8:35       ` Jan Hubicka
2001-09-26 13:03       ` Richard Henderson
2001-09-27  6:29         ` Daniel Berlin
2001-09-27  7:13           ` Gerald Pfeifer
2001-09-27  7:28             ` Daniel Berlin
2001-09-27  7:47               ` David Edelsohn
2001-09-27  7:27           ` Jan Hubicka
2001-09-27  7:38             ` Daniel Berlin
2001-09-27  7:58               ` Jan Hubicka
2001-09-27  9:40                 ` Daniel Berlin
2001-09-27 10:27           ` Richard Henderson
2001-09-27 11:21             ` Daniel Berlin
2001-10-01 17:07             ` Mark Mitchell
2001-09-27 20:12           ` law
2001-09-28 10:49     ` Michael Matz
2001-09-29  6:38       ` Jan Hubicka
2001-10-24 12:35 ` law
2001-10-24 13:00   ` Richard Henderson
2001-10-24 13:27   ` Michael Matz
2001-10-25 11:20     ` law
2001-10-25  6:23   ` Jan Hubicka
2001-10-25  6:36     ` Daniel Berlin

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).