On Mon, May 23, 2016 at 04:28:33PM +0200, Marek Polacek wrote: > As promised in <https://gcc.gnu.org/ml/gcc-patches/2016-05/msg01638.html>, > this is a simple clean-up which makes use of a new predicate. Richi suggested > adding maybe_drop_lhs_from_noreturn_call which would be nicer, but I didn't > know how to do that, given the handling if lhs is an SSA_NAME.
Shouldn't it be should_remove_lhs_p instead? I mean, it is not just an optimization, but part of how we define the IL. Shouldn't it be also used in tree-cfg.c (verify_gimple_call)? > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2016-05-23 Marek Polacek <pola...@redhat.com> > > * tree.h (can_remove_lhs_p): New predicate. > * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Use it. > * gimple-fold.c (gimple_fold_call): Likewise. > * gimplify.c (gimplify_modify_expr): Likewise. > * tree-cfgcleanup.c (fixup_noreturn_call): Likewise. Jakub