This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix call-clobbering (PRs 36373 and 36387)
On Fri, 30 May 2008, Daniel Berlin wrote:
> On Fri, May 30, 2008 at 6:12 PM, Richard Guenther <rguenther@suse.de> wrote:
> >
> > The current call-clobbering code as far as it deals with using
> > the PTA results is missing quite a few cases. First escaped
> > aggregates (as opposed to pointers) are not tracked at all.
>
> Only because you removed the code to do so when you removed SFT's :)
I didn't. We add to call-clobbers by walking processed_ptrs
(see set_initial_properties). We never add pointed-to memory that
is pointed to by memory, not pointers. What we do is mark the
memory call-clobbered (but not in all cases), but that doesn't
fix the reachability issues.
Also the testcases fail on the 4.3 branch as well, which still has
SFTs - so the connection to SFTs is not at all clear.
> > Second, we miss to compute the reachability set of the
> > escaped pointers and only clobber the directly pointed-to
> > memory.
>
> This is because we relied on pta results getting transformed into
> NMT's, and then the NMT's were walked during transitive closure.
> What broke this, it should have worked fine, because the loop in
> mark_call_clobbered already does a transitive closure.
Yes, this is what we still do. But we only generate NMTs for
_pointers_, and only for pointers that are ever de-referenced
and not point to anything. Note that most of the testcases with
the patch deal with escaping pointers in structures.
Richard.