This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] if-to-switch pass
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Cesar Philippidis <cesar_philippidis at mentor dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, <tom at codesourcery dot com>, <stevenb dot gcc at gmail dot com>
- Date: Tue, 2 Jul 2013 00:14:58 +0200
- Subject: Re: [PATCH] if-to-switch pass
- References: <51C4B99C dot 8030503 at mentor dot com> <CAFiYyc0kr+iOMK5XPxrea5tH47qHL60xEh1v2U4MN4o-+8F4+Q at mail dot gmail dot com> <51D16FD0 dot 3010800 at mentor dot com>
On 01/07/13 14:02, Tom de Vries wrote:
>> > I also dislike the two passes being in early optimizations - that way they do
>> > not see the effects of IPA inlining / LTO IPA-CP transforms.
>> > I'd rather move
>> > it way down towards RTL expansion (though eventually some may say that
>> > switch-conversion may enable vectorization opportunities for example).
>> >
> Right, you discussed that with Steven here earlier:
> http://gcc.gnu.org/ml/gcc-patches/2012-07/msg01156.html.
>
> Steven proposed to move pass_switch_conversion to before split_functions.
> Attached patch attempts to do that, I'm testing that now.
>
> That doesn't address your concern about seeing effects of IPA inlining / LTO
> IPA-CP transforms though.
>
> Is this patch ok (once tested),
Bootstrapped and reg-tested on x86_64 (ada inclusive), no issues found.
OK for trunk?
Thanks,
- Tom
> or do you really want pass_switch_conversion
> later, say the first in pass_all_optimizations, or f.i. after pass_pre to
> pick-up on tail-merge creating opportunities for if-to-switch conversion once we
> check that in before or merge with pass_switch_conversion?
>
> Thanks,
> - Tom
>
> 2013-07-01 Tom de Vries <tom@codesourcery.com>
>
> passes.c (init_optimization_passes): Move pass_convert_switch to before
> pass_{feedback_,}split_functions.
> tree-pass.h (pass_feedback_convert_switch): Declare new pass.
> tree-switch-conversion.c (switchconv_gate): Don't run when profiling.
> (feedback_switchconv_gate): New function.
> (pass_feedback_convert_switch): New pass.