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] Fix PR38826 and PR38477


On Wed, Jan 14, 2009 at 4:19 AM, Richard Guenther <rguenther@suse.de> wrote:
> On Tue, 13 Jan 2009, Daniel Berlin wrote:
>
>> How is this not going to become the same problem with IPA mode?
>> ISTM we should probably move the computation of call clobbering to be
>> more independent of the rest of PTA.
>
> You cannot decouple them, as a call may clobber (and thus affects
> the points-to sets) of all reachable memory.

True, but you can assume that all address taken pointers are included in that :)
IE there is a conservatively correct set of things you can use.

>  Unless you mark all
> memory that had its address taken as pointing to anything after each call,
> of course.

Right.
MOD/REF depends on aliasing info, aliasing info does not depend on MOD/REF.

>
>> So, after talking with some others who work on points-to algorithms,
>> we've all agreed the proper solution to this problem is to mark all
>> nodes in a structure as indirect when the structure is address taken
>> (IE set graph->direct_nodes[n] false for each node). The notion of an
>> indirect node is that it can be referenced without using it's
>> syntactic name, which is exactly what is happening here.
>> This only affects the offline optimization portion.
>> It will cause slightly less offline optimization, but that is fixable
>> in other ways.
>
> Ok, I will try to do this.

I can do it if you want, I have a little time this week.
The only function you should need to modify is build_pred_graph where
it handles addressof.


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