This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] fix opt/13798
- From: Joern Rennecke <amylaar at fairadsl dot co dot uk>
- To: hubicka at ucw dot cz
- Cc: joern dot rennecke at superh dot co (Joern Rennecke), rth at redhat dot com (Richard Henderson), dalej at apple dot com (Dale Johannesen), gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Jan 2004 00:24:52 +0000 (GMT)
- Subject: Re: [tree-ssa] fix opt/13798
> Consider two inline copies of the same function sharing same static
> variable where we optimized out the address taking operand in one but
> fialed to do so in the other.
If TREE_ADDRESSABLE on the variable declaration is cleared even though the
variable is still addressed by one or more copies of the function, I would
consider this a bug.
> This is why I think the function scopeness is quite useless especially
> when we can determine this globally using cgraph datastructures.
The patch was originally written for gcc 3.2 . I've merged into a copy
of 3.3.2, but as I said, I haven't started bringing it forward into 3.5;
I posted it because Dale Johannesen said that he wanted to work on this
If we can determine if a static variable is addressed anywhere in the
current file now, so much the better.
Still, the basic point remains: we don't have to do an all-or-nothing
static -> auto conversion, and we can make the existing optimizers do
the grunt work, if we just make this information available to