Re: [PATCH] Remove uninitialized reads of is_leaf

2017-04-28 Thread Jeff Law
On 11/29/2016 12:54 PM, Wilco Dijkstra wrote: Jeff Law wrote: On 11/29/2016 11:39 AM, Wilco Dijkstra wrote: I forgot to ask, would it be reasonable to add an assert to check we're not in a sequence in leaf_function_p? I guess this will trigger on several targets (leaf_function_p is used in

Re: [PATCH] Remove uninitialized reads of is_leaf

2016-11-29 Thread Wilco Dijkstra
Jeff Law wrote: > On 11/29/2016 11:39 AM, Wilco Dijkstra wrote: > > I forgot to ask, would it be reasonable to add an assert to check we're not > > in > > a sequence in leaf_function_p? I guess this will trigger on several targets > > (leaf_function_p is used in several backends) but it's a real

Re: [PATCH] Remove uninitialized reads of is_leaf

2016-11-29 Thread Jeff Law
On 11/29/2016 11:39 AM, Wilco Dijkstra wrote: Jeff Law wrote: On 11/29/2016 04:10 AM, Wilco Dijkstra wrote: GCC caches the whether a function is a leaf in crtl->is_leaf. Using this in the backend is best as leaf_function_p may not work correctly (eg. while emitting prolog or epilog code). I

Re: [PATCH] Remove uninitialized reads of is_leaf

2016-11-29 Thread Wilco Dijkstra
Jeff Law wrote: > On 11/29/2016 04:10 AM, Wilco Dijkstra wrote: > > GCC caches the whether a function is a leaf in crtl->is_leaf. Using this > > in the backend is best as leaf_function_p may not work correctly (eg. while > > emitting prolog or epilog code).  I forgot to ask, would it be

Re: [PATCH] Remove uninitialized reads of is_leaf

2016-11-29 Thread Jeff Law
On 11/29/2016 04:10 AM, Wilco Dijkstra wrote: GCC caches the whether a function is a leaf in crtl->is_leaf. Using this in the backend is best as leaf_function_p may not work correctly (eg. while emitting prolog or epilog code). There are many reads of crtl->is_leaf before it is initialized.