This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: small optimization in iconv/skeleton.c
- To: Bruno Haible <haible at ilog dot fr>
- Subject: Re: small optimization in iconv/skeleton.c
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 11 Sep 2000 13:01:44 -0700
- Cc: libc-alpha at sources dot redhat dot com
- References: <14781.859.734360.896133@honolulu.ilog.fr>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
Bruno Haible <haible@ilog.fr> writes:
> if (((MAX_NEEDED_FROM > 1 && FROM_DIRECTION)
> || (MAX_NEEDED_TO > 1 && !FROM_DIRECTION))
> is certain to evaluate to 1 if MAX_NEEDED_FROM > 1 and MAX_NEEDED_TO
> > 1 are both true. Here is a patch to optimize this. It elimimates a
> redundant runtime test which gcc-2.95.2, even with "-O2", does not
> completely eliminate.
I checked the gcc version I was using at some time that this isn't the
case but it cannot hurt having the patch. Thanks,
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------