This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Importance of transformations that turn data dependencies into control dependencies?
- From: Michael Matz <matz at suse dot de>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Torvald Riegel <triegel at redhat dot com>, GCC Development <gcc at gcc dot gnu dot org>, paulmck <paulmck at linux dot vnet dot ibm dot com>
- Date: Tue, 1 Mar 2016 17:55:07 +0100 (CET)
- Subject: Re: Importance of transformations that turn data dependencies into control dependencies?
- Authentication-results: sourceware.org; auth=none
- References: <1456256313 dot 4167 dot 48 dot camel at localhost dot localdomain> <CAFiYyc03Ka96tZ2pN+mY9wmX3pZKgMPjUGBq6HSbw8+tVquJfQ at mail dot gmail dot com> <1456421623 dot 4167 dot 79 dot camel at localhost dot localdomain> <CAFiYyc32rEcDQGV_gOUMHjqyRQc1LX0=CCQUdWKQAGYeLVaA=w at mail dot gmail dot com> <1456513835 dot 4167 dot 142 dot camel at localhost dot localdomain> <CAFiYyc1Q=vb0xz2K6UhJ=j=uz6_BvG0wGXdqpLBqnvOf43TwCg at mail dot gmail dot com>
Hi,
On Tue, 1 Mar 2016, Richard Biener wrote:
> > What about the example I gave above? Is it unrealistic for compilers
> > do ever do something like this, or is it just unlikely to gain much
> > performance, or is it just that GCC does not do this today?
>
> GCC does not do this today with the exception of value-profiling. GCC
> in other cases does not establish equivalences but only relations (a <
> b, etc.) that are not a problem as far as I can see because those do not
> allow to change expressions using a to use b.
Made up example using relations:
int32 a, b;
a = (b >> 31) & 1;
-->
if (b < 0)
a = 1;
else
a = 0;
data-dep to control-dep and only relations :) (I think this is taken care
of by Pauls wording, ignoring the fact that these aren't pointers anyway
and hence don't carry a dependency through them, only onto them at max)
Ciao,
Michael.