Re: [PATCH] Handle __builtin_unreachable () using assertions in VRP

2013-11-04 Thread Tom de Vries
On 04/11/13 01:59, Tom de Vries wrote: > On 29/10/13 14:54, Jakub Jelinek wrote: >> +/* Return true if all imm uses of VAR are either in STMT, or >> + feed (optionally through a chain of single imm uses) GIMPLE_COND >> + in basic block COND_BB. */ >> + >> +static bool >> +all_imm_uses_in_stmt_

Re: [PATCH] Handle __builtin_unreachable () using assertions in VRP

2013-11-03 Thread Tom de Vries
On 29/10/13 14:54, Jakub Jelinek wrote: > +/* Return true if all imm uses of VAR are either in STMT, or > + feed (optionally through a chain of single imm uses) GIMPLE_COND > + in basic block COND_BB. */ > + > +static bool > +all_imm_uses_in_stmt_or_feed_cond (tree var, gimple stmt, basic_bloc

Re: [PATCH] Handle __builtin_unreachable () using assertions in VRP

2013-10-29 Thread Richard Biener
On Tue, 29 Oct 2013, Jakub Jelinek wrote: > On Tue, Oct 29, 2013 at 12:28:49PM +0100, Richard Biener wrote: > > Otherwise ok. > > So like this? Yes, Thanks. Richard. > 2013-10-29 Jakub Jelinek > > * tree-cfg.c (assert_unreachable_fallthru_edge_p): New function. > * tree-cfg.h (a

Re: [PATCH] Handle __builtin_unreachable () using assertions in VRP

2013-10-29 Thread Jakub Jelinek
On Tue, Oct 29, 2013 at 12:28:49PM +0100, Richard Biener wrote: > Otherwise ok. So like this? 2013-10-29 Jakub Jelinek * tree-cfg.c (assert_unreachable_fallthru_edge_p): New function. * tree-cfg.h (assert_unreachable_fallthru_edge_p): New prototype. * tree-vrp.c (all_i

Re: [PATCH] Handle __builtin_unreachable () using assertions in VRP

2013-10-29 Thread Richard Biener
On Fri, 25 Oct 2013, Jakub Jelinek wrote: > Hi! > > As discussed on IRC, this patch attempts to preserve VRP computed > range info for some simple __builtin_unreachable () using assertions. > If there are no immediate uses of some SSA_NAME except for those in > a condition guarding __builtin_unre

[PATCH] Handle __builtin_unreachable () using assertions in VRP

2013-10-25 Thread Jakub Jelinek
Hi! As discussed on IRC, this patch attempts to preserve VRP computed range info for some simple __builtin_unreachable () using assertions. If there are no immediate uses of some SSA_NAME except for those in a condition guarding __builtin_unreachable () and in ASSERT_EXPR in the following basic bl