This is the mail archive of the
mailing list for the GCC project.
Re: Importance of transformations that turn data dependencies into control dependencies?
- From: "Paul E. McKenney" <paulmck at linux dot vnet dot ibm dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Torvald Riegel <triegel at redhat dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 1 Mar 2016 13:05:38 -0800
- 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> <alpine dot LSU dot 2 dot 20 dot 1603011748130 dot 20277 at wotan dot suse dot de>
- Reply-to: paulmck at linux dot vnet dot ibm dot com
On Tue, Mar 01, 2016 at 05:55:07PM +0100, Michael Matz wrote:
> 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;
> 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)
Agreed, these are not pointers, and therefore do not carry dependencies.