This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Teach VRP to derive ranges from SWITCH_EXPR (fix PR21258)


On 4/13/07, Jeffrey Law <law@redhat.com> wrote:
On Fri, 2007-04-13 at 07:55 -0400, Diego Novillo wrote:
> Richard Guenther wrote on 04/13/07 05:20:
>
> > No noticable slowdowns, I have applied the patch to mainline.  A patch
> > for 14495 is in work.
>
> I forgot to ask, what was the net effect of the optimization in terms of
> code size or performance of generated code?
FWIW, I wouldn't have expected much of a code speed improvement, it's
rare that a SWITCH_EXPR is on the critical path *and* there's
opportunity for improvement via VRP derived ranges related to the
switch statement.

Checking enabled GCC is an example where I would expect runtime savings because the above cenario happens often (of course not in critical loops, and the remaining branches are easy to predict). Of course VRP is currently limited in other ways, so the improvement is not as big as possible (I'm working on that).

It might be interesting to see if we can zap the code in
tree-ssa-dom.c::record_edge_info -- in theory it should be
subsumed by VRP.

OTOH DOM runs far more often than VRP so I would expect to see fallouts as we'd have a different pass ordering. Certainly worth investigating though.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]