* shouldn't every middle-end pass be uniquely named?
@ 2008-07-31 8:25 Basile STARYNKEVITCH
2008-07-31 9:03 ` Andrew Thomas Pinski
0 siblings, 1 reply; 4+ messages in thread
From: Basile STARYNKEVITCH @ 2008-07-31 8:25 UTC (permalink / raw)
To: GCC Mailing List
Hello All,
Some middle-end passes (those declared in tree-passes.h) are still unnamed.
I tend to believe that it would be helpful (mostly for gcc debugging
purposes) that every struct opt_pass (without exception) should be
uniquely named (and that this should be enforced, eg. in ENABLE_CHECKING
mode (essentially by registering each pass in an hash table in function
next_pass_1 of gcc/passes.c)
What do people think about that?
Except as a habit (which I think is a bad one) is there any reason to
have anonymous passes (those with a null pass->name), or (I don't know
if such beast exists) homonym passes (two different passes with equal
pass->name)?
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: shouldn't every middle-end pass be uniquely named?
2008-07-31 8:25 shouldn't every middle-end pass be uniquely named? Basile STARYNKEVITCH
@ 2008-07-31 9:03 ` Andrew Thomas Pinski
2008-07-31 9:13 ` Basile STARYNKEVITCH
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Thomas Pinski @ 2008-07-31 9:03 UTC (permalink / raw)
To: Basile STARYNKEVITCH; +Cc: GCC Mailing List
Sent from my iPhone
On Jul 31, 2008, at 1:11, Basile STARYNKEVITCH
<basile@starynkevitch.net> wrote:
> Hello All,
>
> Some middle-end passes (those declared in tree-passes.h) are still
> unnamed.
>
> I tend to believe that it would be helpful (mostly for gcc debugging
> purposes) that every struct opt_pass (without exception) should be
> uniquely named (and that this should be enforced, eg. in
> ENABLE_CHECKING mode (essentially by registering each pass in an
> hash table in function next_pass_1 of gcc/passes.c)
>
> What do people think about that?
>
> Except as a habit (which I think is a bad one) is there any reason
> to have anonymous passes (those with a null pass->name), or (I don't
> know if such beast exists) homonym passes (two different passes with
> equal pass->name)?
Yes. To prevent a dump file. One such example is freeing the internal
data structures. That should not have a dump.
>
>
> Regards.
> --
> Basile STARYNKEVITCH http://starynkevitch.net/Basile/
> email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
> 8, rue de la Faiencerie, 92340 Bourg La Reine, France
> *** opinions {are only mines, sont seulement les miennes} ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: shouldn't every middle-end pass be uniquely named?
2008-07-31 9:03 ` Andrew Thomas Pinski
@ 2008-07-31 9:13 ` Basile STARYNKEVITCH
2008-07-31 9:36 ` Basile STARYNKEVITCH
0 siblings, 1 reply; 4+ messages in thread
From: Basile STARYNKEVITCH @ 2008-07-31 9:13 UTC (permalink / raw)
To: Andrew Thomas Pinski; +Cc: GCC Mailing List
Andrew Thomas Pinski wrote:
>
>
> Sent from my iPhone
>>
>> Except as a habit (which I think is a bad one) is there any reason to
>> have anonymous passes (those with a null pass->name), or (I don't know
>> if such beast exists) homonym passes (two different passes with equal
>> pass->name)?
>
> Yes. To prevent a dump file. One such example is freeing the internal
> data structures. That should not have a dump.
We might add a field (e.g. unsigned avoid_dump) to struct opt_pass for
that, or decide that passes name starting with a star (or whatever
convention people want) do not have any dump file.
In addition of help debugging of GCC, having each pass be named could be
helpful for other reasons. For example, a plugin machinery would be much
simpler (basically a plugin could say add my pass named foo after every
pass named bar).
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: shouldn't every middle-end pass be uniquely named?
2008-07-31 9:13 ` Basile STARYNKEVITCH
@ 2008-07-31 9:36 ` Basile STARYNKEVITCH
0 siblings, 0 replies; 4+ messages in thread
From: Basile STARYNKEVITCH @ 2008-07-31 9:36 UTC (permalink / raw)
To: Andrew Thomas Pinski; +Cc: GCC Mailing List
Basile STARYNKEVITCH wrote:
> Andrew Thomas Pinski wrote:
>>>
>>> Except as a habit (which I think is a bad one) is there any reason to
>>> have anonymous passes (those with a null pass->name), or (I don't
>>> know if such beast exists) homonym passes (two different passes with
>>> equal pass->name)?
>>
>> Yes. To prevent a dump file. One such example is freeing the internal
>> data structures. That should not have a dump.
>
> We might add a field (e.g. unsigned avoid_dump) to struct opt_pass for
> that, or decide that passes name starting with a star (or whatever
> convention people want) do not have any dump file.
I actually proposed a patch on gcc-patches@ which do not dump when the
pass name starts with a dot (better than a star, because following unix
conventions for "hidden" files)
http://gcc.gnu.org/ml/gcc-patches/2008-07/msg02406.html
regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-31 9:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-31 8:25 shouldn't every middle-end pass be uniquely named? Basile STARYNKEVITCH
2008-07-31 9:03 ` Andrew Thomas Pinski
2008-07-31 9:13 ` Basile STARYNKEVITCH
2008-07-31 9:36 ` Basile STARYNKEVITCH
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).