public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Giovanni Bajo" <rasky@develer.com>
To: "Diego Novillo" <dnovillo@redhat.com>
Cc: "Paul Schlie" <schlie@comcast.net>, <gcc@gcc.gnu.org>
Subject: Re: potential simple loop optimization assistance strategy?
Date: Fri, 01 Jul 2005 18:26:00 -0000	[thread overview]
Message-ID: <02fe01c57e6a$4f907eb0$bf03030a@trilan> (raw)
In-Reply-To: <20050701182201.GA8567@topo.toronto.redhat.com>

Diego Novillo <dnovillo@redhat.com> wrote:

>> There has been some opposition in the past about allowing conditions in
>> asserts to be used as hints to the optimizers. In fact, I would like to
>> know if there is a current statement of purpose about this. That is,
would
>> there be strong oppositions to patches doing this?
>>
> VRP naturally takes advantage of assert (though not in some
> occassions involving unsigned types).  Try:
>
> #include <assert.h>
>
> foo (int i)
> {
>   assert (i != 0);
>   if (i == 0)
>     return 3;
>
>   return 2;
> }

Agreed, but my point is whether we can do that when NDEBUG is defined.
-- 
Giovanni Bajo

  reply	other threads:[~2005-07-01 18:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-01 15:51 Paul Schlie
2005-07-01 16:24 ` Gabriel Dos Reis
2005-07-01 17:15   ` Paul Schlie
2005-07-01 16:27 ` Devang Patel
2005-07-01 18:16 ` Giovanni Bajo
2005-07-01 18:22   ` Diego Novillo
2005-07-01 18:26     ` Giovanni Bajo [this message]
2005-07-01 19:42       ` Paul Schlie
     [not found]       ` <m3k6ka6po1.fsf@localhost.localdomain>
2005-07-02  9:18         ` Giovanni Bajo
2005-07-02 15:39           ` Michael Veksler
2005-07-02 18:58             ` Giovanni Bajo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='02fe01c57e6a$4f907eb0$bf03030a@trilan' \
    --to=rasky@develer.com \
    --cc=dnovillo@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=schlie@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).