This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Trust TREE_ADDRESSABLE
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: Richard Biener <rguenther at suse dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, Steven Bosscher <stevenb dot gcc at gmail dot com>
- Date: Wed, 11 Jun 2014 11:12:32 +0200
- Subject: Re: [PATCH] Trust TREE_ADDRESSABLE
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1406041546210 dot 2632 at zhemvz dot fhfr dot qr> <2685611 dot 7EAaufEEm6 at polaris> <alpine dot LSU dot 2 dot 11 dot 1406101021520 dot 2632 at zhemvz dot fhfr dot qr> <2743517 dot a6PhG79muX at polaris>
On Wed, Jun 11, 2014 at 11:08 AM, Eric Botcazou <email@example.com> wrote:
>> Note that I'm happy to revert the change.
>> I am hesitant to any approach that overloads TREE_ADDRESSABLE even more.
>> It already is used for two (slightly) different things - first the
>> "old" meaning that the address of the symbol is needed, second, that
>> the symbol is aliased by pointers. Those are of course related, but
>> as you see they are not 100% equivalent.
>> As I already added DECL_NONALIASED (for VAR_DECLs) to "fix" that
>> coverage counter issue (those are TREE_STATIC but they have their
>> address taken - still we know that no pointers alias the accesses),
>> we can as well rely on that flag - but then we should set it whenever
>> a TU-local decl does not have its address taken (!TREE_ADDRESSABLE).
> Why not just make the change to may_be_aliased in LTO mode, with a comment
> saying that TREE_PUBLIC and DECL_EXTERNAL aren't fully correct any longer?
Because that's not the point and because it feels like a hack ;)
I could do || in_lto_p and make LTO "properly" set TREE_ADDRESSABLE.
But then we can make the IPA machinery "properly" set TREE_ADDRESSABLE
as well, unconditionally, just like with my
proposed patch to fix the fallout.
> Eric Botcazou