This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
optimization.
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
alias.c:nonoverlapping_memrefs_p .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]