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: [PATCH] Trust TREE_ADDRESSABLE


On Wed, 11 Jun 2014, Eric Botcazou wrote:

> > Because that's not the point and because it feels like a hack ;)
> 
> Well, if we keep the current semantics of TREE_ADDRESSABLE and decide that the 
> predicate for aliasing is may_be_aliased, the implementation for the latter 
> becomes a detail.  And it would seem better/simpler to have the knowledge 
> localized in this single predicate than spread over multiple files and FEs.

Sure.  Still currently TREE_ADDRESSABLE on TREE_PUBLIC/DECL_EXTERNAL
VAR_DECLs carries no useful information, so I consider the bit unused.
I propose to add semantics for it.

Btw, the optimization is not restricted to LTO but also applies
to -fwhole-program (poor-mans single-TU "LTO").  So it is a
property that could be computed (as Honza says) by the IPA
visibility pass (in the -fwhole-program non-LTO case it promotes
those decls to !TREE_PUBLIC && TREE_STATIC).

Richard.


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