This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Avoid extending lifetime of likely spilled hard regs in ifcvt before reload (PR rtl-optimization/56484)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Uros Bizjak <ubizjak at gmail dot com>
- Date: Tue, 5 Mar 2013 23:03:13 +0100
- Subject: Re: [PATCH] Avoid extending lifetime of likely spilled hard regs in ifcvt before reload (PR rtl-optimization/56484)
- References: <20130305162646.GJ12913@tucnak.redhat.com> <3897593.89GmqB5X3k@polaris>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Mar 05, 2013 at 06:28:13PM +0100, Eric Botcazou wrote:
> > Without this patch, ifcvt extends lifetime of %eax hard register,
> > which causes reload/LRA ICE later on. Combiner and other passes try hard
> > not to do that, even ifcvt has code for it if x is a hard register a few
> > lines below it, but in this case the hard register is SET_SRC (set_b).
> > With this patch we just use the pseudo (x) which has been initialized
> > from the hard register before the conditional.
> > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> > 2013-03-05 Jakub Jelinek <firstname.lastname@example.org>
> > PR rtl-optimization/56484
> > * ifcvt.c (noce_process_if_block): Before reload if else_bb
> > is NULL, avoid extending lifetimes of hard registers in
> > likely to spilled or small register classes.
> ifcvt.c tests only small_register_classes_for_mode_p in the other places, so
> do you really need class_likely_spilled_p here?
I guess I don't. I've grepped for small_register_classes_for_mode_p and didn't see
anything in i386, so I figured out that it would be using a default (which
is false). But apparently it uses hook_bool_mode_true, so it is a superset
of class_likely_spilled_p, guess I can leave that out.