This is the mail archive of the
mailing list for the GCC project.
Re: var-tracking wrt. leaf regs on sparc
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: gcc at gcc dot gnu dot org, jakub at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 06 Feb 2013 11:13:30 +0100
- Subject: Re: var-tracking wrt. leaf regs on sparc
- References: <firstname.lastname@example.org> <email@example.com>
> Now that I understand fully what we're trying to accomplish with the
> DT_OP_GNU_entry_value and DT_OP_GNU_call_site_parameter extensions, it
> does in fact seem like we will need to do leaf register remapping in
> Here below is a patch I'm playing with. It's a rough draft but it
> definitely fixes the pr54200.c problem completely.
Thanks for tackling this. I cannot really comment on the patch itself (Jakub
is the resident expert here), only on its idea. I think that the most correct
approach would indeed be to also do leaf register remapping in var-tracking.c,
before analyzing the RTL stream, so that everything is correctly exposed. In
practice, that might be a little heavy-handed though, so...
> Another way to do this would be to not translate the incoming
> parameter registers (leave them at %i*) if we don't see the window
> save. That way we only have to play the regno remapping game for
> these specific incoming argument pieces, rather than for everything we
> look at in the RTL stream.
...yes, probably much lighter. I think testing crtl->uses_only_leaf_regs is
sufficient here (and while you're at it, you could also test the value of
HAVE_window_save, which can be 0 if -mflat is passed on the SPARC), so
if (HAVE_window_save && !crtl->uses_only_leaf_regs)