Re: [PATCH] Add sequence check to leaf_function_p

2017-05-12 Thread Jeff Law
On 05/12/2017 10:29 AM, Wilco Dijkstra wrote: Alexander Monakov wrote: As I understand, we need to ensure that get_insns call retrieves the topmost sequence corresponding to the function body, not any current subsequence that could have been started via start_sequence. Therefore the 'prolog or

Re: [PATCH] Add sequence check to leaf_function_p

2017-05-12 Thread Jeff Law
On 05/12/2017 07:30 AM, Alexander Monakov wrote: On Fri, 12 May 2017, Wilco Dijkstra wrote: This is a followup from: https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02916.html Add an assert to leaf_function_p to ensure it is not called from a prolog or epilog sequence (which would incorrectly r

Re: [PATCH] Add sequence check to leaf_function_p

2017-05-12 Thread Wilco Dijkstra
Alexander Monakov wrote: > As I understand, we need to ensure that get_insns call retrieves the topmost > sequence corresponding to the function body, not any current subsequence that > could have been started via start_sequence.  Therefore the 'prolog or epilog' > part is a bit misleading, we coul

Re: [PATCH] Add sequence check to leaf_function_p

2017-05-12 Thread Alexander Monakov
On Fri, 12 May 2017, Wilco Dijkstra wrote: > This is a followup from: > https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02916.html > > Add an assert to leaf_function_p to ensure it is not called from a > prolog or epilog sequence (which would incorrectly return true in a > non-leaf function). As