This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: non-local goto optimization
- From: Roman Zippel <zippel at linux-m68k dot org>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org, Nathan Sidwell <nathan at codesourcery dot com>
- Date: Thu, 5 Jul 2007 17:40:13 +0200 (CEST)
- Subject: Re: non-local goto optimization
- References: <462C6A54.7080502@codesourcery.com> <465177E1.8040202@codesourcery.com> <Pine.LNX.4.64.0707042303270.1820@scrub.home> <200707050940.24218.ebotcazou@libertysurf.fr>
Hi,
On Thu, 5 Jul 2007, Eric Botcazou wrote:
> Could you clarify? The only change to current_function_has_nonlocal_label was
> in expand_builtin_unwind_init, not in reload. However, I understand that it
> can be problematic for back-ends and that they need to be audited.
m68k is using current_function_has_nonlocal_label and now the pic register
isn't restored anymore during unwind.
> > I could now just update the condition or I could fix this once and for all
> > and introduce a flag which tells the back end explicitly when to save
> > additional fixed register in this case.
>
> I think that 2 flags are overkill and that you should update the condition.
The condition has become nontrivial and I'd like to avoid simliar problems
in the future. I wouldn't exactly call it overkill, it's quite cheap and
makes the dependency that reload wants to save/restore all register
explicit.
Another alternative I would consider is to move the condition to a
function and use this were needed, but duplication the condition itself is
IMHO really the worst solution.
bye, Roman