Re: [PATCH] non-checking pure attribute

2017-05-10 Thread Richard Biener
On Tue, May 9, 2017 at 5:16 PM, Nathan Sidwell wrote: > On 05/09/2017 09:39 AM, Richard Biener wrote: >> >> On Tue, May 9, 2017 at 3:33 PM, Nathan Sidwell wrote: > > >>> I wondered if we'd get sane backtraces and what not, if the optimizer >>> thought such functions never barfed. >> >> >> Well, I

Re: [PATCH] non-checking pure attribute

2017-05-09 Thread Nathan Sidwell
On 05/09/2017 09:39 AM, Richard Biener wrote: On Tue, May 9, 2017 at 3:33 PM, Nathan Sidwell wrote: I wondered if we'd get sane backtraces and what not, if the optimizer thought such functions never barfed. Well, I think you'd either ICE in the first check or can safely CSE the second. Do

Re: [PATCH] non-checking pure attribute

2017-05-09 Thread Richard Biener
On Tue, May 9, 2017 at 3:33 PM, Nathan Sidwell wrote: > On 05/09/2017 09:19 AM, Richard Biener wrote: >> >> On Tue, May 9, 2017 at 3:01 PM, Nathan Sidwell wrote: > > >> Ok, but ... are they not "pure" enough? That is, do we really care to >> preserve >> the checking side-effect for example when

Re: [PATCH] non-checking pure attribute

2017-05-09 Thread Nathan Sidwell
On 05/09/2017 09:19 AM, Richard Biener wrote: On Tue, May 9, 2017 at 3:01 PM, Nathan Sidwell wrote: Ok, but ... are they not "pure" enough? That is, do we really care to preserve the checking side-effect for example when doing tree_fits_uhwi (t); (result unused)? I wondered about that

Re: [PATCH] non-checking pure attribute

2017-05-09 Thread Richard Biener
On Tue, May 9, 2017 at 3:01 PM, Nathan Sidwell wrote: > Hi, > For name-lookup cleanup I introduced some accessors that are pure functions > when we're not checking. I noticed we already had a couple of them, so > introduced an ATTRIBUTE_NTC_PURE define. It avoid #ifndefs and stray > semicolons.

[PATCH] non-checking pure attribute

2017-05-09 Thread Nathan Sidwell
Hi, For name-lookup cleanup I introduced some accessors that are pure functions when we're not checking. I noticed we already had a couple of them, so introduced an ATTRIBUTE_NTC_PURE define. It avoid #ifndefs and stray semicolons. ok? nathan -- Nathan Sidwell 2017-05-09 Nathan Sidwell