This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Fortran] Support inverted execution masks in WHEREs
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Roger Sayle" <roger at eyesopen dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 22 Feb 2006 12:02:36 +0100
- Subject: Re: [Fortran] Support inverted execution masks in WHEREs
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=peygSH7tr5OxM9iDi0rs0QFXZv/SHU+dTMVCMb7tugnoSA/tFmb+Wn2V6I04s1mvHhaU75zPdk/s0cxaKeAiRL3P86gWDMfRussWHFOnxbzON+xB4g+KxqnEWVfyl/SRBn0F6O29okTtNX6ZlNiH/Dn6KvqYXZcpC116ByLFzn4=
- References: <Pine.LNX.4.44.0602211718320.11285-100000@www.eyesopen.com>
On 2/22/06, Roger Sayle <roger@eyesopen.com> wrote:
> cmask = malloc(...);
> for (i=0; i<...; i++)
> cmask[i] = cond(i);
> for (i=0; i<...; i++)
> if (cmask[i])
> stmt1(i);
> for (i=0; i<...; i++)
> if (!cmask[i])
> stmt2(i);
> free(cmask);
I wonder why we use multiple loops here - at least fusing the last two ones
would be more cache friendly for use of the mask. Or does fusing the loops
create worse code somehow?
Richard.