This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Teach VRP to derive ranges from SWITCH_EXPR (fix PR21258)
Richard Guenther wrote on 04/12/07 10:58:
> There's a 1% slowdown for compiling tree.i with an unoptimized, checking
> enabled stage1 compiler.
> The patch will be on the C++ tester tonight to gather
> more numbers. GCC of course has lots of switch statements but also
> benefits most from this optimization.
Well, it's important because last time I tried, the slowdowns didn't
justify the opportunities VRP found. VRP is already slow.
Transformations for the sake of transformations are rarely a good idea.
> I think that's an orthogonal problem -- will the propagator engine
> be able to handle SWITCH_EXPR if I just touch this piece of VRP?
The only limitation is that you won't be able to tell it that more than
one edge is executable. It understands ALL, 0 or 1.