This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PING][RFC] Assertions as optimization hints
- From: Soul Studios <matt at soulstudios dot co dot nz>
- To: Yuri Gribov <tetra2005 at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Cc: bonzini at gnu dot org, alexr at leftfield dot org
- Date: Mon, 28 Nov 2016 13:31:39 +1300
- Subject: Re: [PING][RFC] Assertions as optimization hints
- Authentication-results: sourceware.org; auth=none
- References: <CAJOtW+48=FfefSgyPakMmFzaHfCqNv0CpXY-1p3gva4ShuqgjA@mail.gmail.com>
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 aliasing restrictions.
As a side note, at least some users may consider this a useful feature:
http://www.nntp.perl.org/group/perl.perl5.porters/2013/11/msg209482.html
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.