On 2016-11-28 18:49:55 +, Yuri Gribov wrote:
> On Mon, Nov 28, 2016 at 4:03 PM, Vincent Lefevre
> wrote:
> > Concerning the "per-project decision", I'm not sure that's a good
> > idea: as soon as one includes a header file, __ASSUME_ASSERTS__
> > could potentially break code.
>
> Sorry, not
On Mon, Nov 28, 2016 at 4:03 PM, Vincent Lefevre wrote:
> On 2016-11-23 16:03:44 +, Yuri Gribov wrote:
>> Definitely, aggressively abusing assertions like this should be a
>> per-project decision. E.g. I've seen code which parallels assertions
>> with error checking i.e. something like
>> FI
On 2016-11-23 16:03:44 +, Yuri Gribov wrote:
> Definitely, aggressively abusing assertions like this should be a
> per-project decision. E.g. I've seen code which parallels assertions
> with error checking i.e. something like
> FILE *p = fopen(...);
> assert(p); // Quickly abort in debug m
On Wednesday 23 November 2016, Richard Biener wrote:
> On Tue, Nov 22, 2016 at 6:52 PM, Yuri Gribov wrote:
> > Hi all,
> >
> > I've recently revisited an ancient patch from Paolo
> > (https://gcc.gnu.org/ml/gcc-patches/2004-04/msg00551.html) which uses
> > asserts as optimization hints. I've rewr
The main problem with __assume is that it should never be used.
Literally, if you have to use it, then the code it refers to should
actually be commented out.
ps. This is a bit of a simplification - I should have stated, if the
assumption is wrong, it can lead to dangerous code which breaks.
Does this approach make sense in general? If it does I can probably
come up with more measurements.
Sounds good to me-not sure why there hasn't been more response to this, it
seems logical-
if functions can make assumptions such as pointerA != pointerB then that
leads the way for avoiding alia
On Wed, Nov 23, 2016 at 11:31 AM, Richard Biener
wrote:
> On Tue, Nov 22, 2016 at 6:52 PM, Yuri Gribov wrote:
>> Hi all,
>>
>> I've recently revisited an ancient patch from Paolo
>> (https://gcc.gnu.org/ml/gcc-patches/2004-04/msg00551.html) which uses
>> asserts as optimization hints. I've rewrit
On Tue, Nov 22, 2016 at 6:52 PM, Yuri Gribov wrote:
> Hi all,
>
> I've recently revisited an ancient patch from Paolo
> (https://gcc.gnu.org/ml/gcc-patches/2004-04/msg00551.html) which uses
> asserts as optimization hints. I've rewritten the patch to be more
> stable under expressions with side-ef
Hi all,
I've recently revisited an ancient patch from Paolo
(https://gcc.gnu.org/ml/gcc-patches/2004-04/msg00551.html) which uses
asserts as optimization hints. I've rewritten the patch to be more
stable under expressions with side-effects and did some basic
investigation of it's efficacy.
Optimi