Re: Tighten check for whether a sibcall references local variables

2016-11-23 Thread Jeff Law
On 11/23/2016 10:09 AM, Richard Sandiford wrote: Richard Biener writes: On Tue, Nov 22, 2016 at 10:00 AM, Richard Sandiford wrote: This loop: /* Make sure the tail invocation of this function does not refer to local variables. */ FOR_EACH_LOCAL_DECL (cfun, idx, var) { if

Re: Tighten check for whether a sibcall references local variables

2016-11-23 Thread Richard Sandiford
Richard Biener writes: > On Tue, Nov 22, 2016 at 10:00 AM, Richard Sandiford > wrote: >> This loop: >> >> /* Make sure the tail invocation of this function does not refer >> to local variables. */ >> FOR_EACH_LOCAL_DECL (cfun, idx, var) >> { >> if (TREE_CODE (var) != PARM_DECL

Re: Tighten check for whether a sibcall references local variables

2016-11-22 Thread Richard Biener
On Tue, Nov 22, 2016 at 10:00 AM, Richard Sandiford wrote: > This loop: > > /* Make sure the tail invocation of this function does not refer > to local variables. */ > FOR_EACH_LOCAL_DECL (cfun, idx, var) > { > if (TREE_CODE (var) != PARM_DECL > && auto_var_in_fn_p (v

Tighten check for whether a sibcall references local variables

2016-11-22 Thread Richard Sandiford
This loop: /* Make sure the tail invocation of this function does not refer to local variables. */ FOR_EACH_LOCAL_DECL (cfun, idx, var) { if (TREE_CODE (var) != PARM_DECL && auto_var_in_fn_p (var, cfun->decl) && (ref_maybe_used_by_stmt_p (call, var)