This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] (another one) Fix PR33870, PTA and partitoning interaction
- From: "Daniel Berlin" <dberlin at dberlin dot org>
- To: "Richard Guenther" <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, dnovillo at google dot com
- Date: Wed, 24 Oct 2007 10:39:02 -0400
- Subject: Re: [PATCH] (another one) Fix PR33870, PTA and partitoning interaction
- References: <Pine.LNX.firstname.lastname@example.org>
On 10/24/07, Richard Guenther <email@example.com> wrote:
> So, as opposed to the earlier patch which papered over one specific case
> of the problem (which is that alias partitioning rips apart SFTs belonging
> to the same parent variable), this is a hammer that really solves it
> but at a cost (maybe, to be investigated).
> IMHO the operand scanning part of accesses through pointers is fragile
> in that it requires that the full set of SFTs that possibly are addressed
> by the pointer is available together as aliases of a symbol.
Actually, it only requires that the points-to sets be correct :)
> Note that accesses through pointers are seldom (you have to force
> those via late inlining as in the alias-15.c testcase added, otherwise
> ccp and forwprop do their best job to re-combine those to accesses
> based on the pointed-to variable).
They aren't seldom at all. They happen all the time with any incoming
pointers, which is "all the time" in C++.
> Another possible "fix" for PR33870 would be to force memory partitioning
> to either never put SFTs into MPTs or if an SFT goes into a MPT also
> add all other SFTs belonging to its parent variable. Of course this
> perverts memory partition heuristics and effectively makes SFTs
> useless (unless doing option one which makes one point of MPTs, reduced
> number of VOPs moot).
This is the right option. We have other constraints on partitioning
to make it correct. This is just another one.
Alternatively, i'd rather remove SFT's entirely and force our
optimizers to start doing what they should (use more than just
vdefs/vuses) than I would go back to lying about what the points-to
I just went through a lot of trouble to stop making PTA lie about what
is being pointed to.