[PATCH] if-to-switch pass
Tom de Vries
Tom_deVries@mentor.com
Mon Jul 1 22:15:00 GMT 2013
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.
More information about the Gcc-patches
mailing list