Transformations to increase parallelism (peepholes?)
tm_gccmail@mail.kloo.net
tm_gccmail@mail.kloo.net
Thu Jul 24 21:12:00 GMT 2003
On Wed, 23 Jul 2003, Jan Hoogerbrugge wrote:
> Would it be possible to do (some of) these transformations by means of
> peepholes in the .md file? If so, could somebody tell me how a peephole
> should look like for
>
> reg1 = reg2 + const1
> reg3 = reg1 + const2
>
> to
>
> reg1 = reg2 + const1
> reg3 = reg2 + (const1 + const2)
>
> where const1 + const2 has to be within certain bounds. It tried to write a
> peephole for this but without success. Who helps?
>
> Cheers,
> Jan
You can't treat GCC like a black box and expect this to work.
You need to use GDB and debug the peephole optimizer and figure out why
your pattern isn't matching. You can use the "call" command and use it
with debug_rtx() to debug the peephole optimizer.
You probably don't want to do this with the peephole optimizer, since it
runs after both instruction scheduling passes. You probably want to use
peephole2 instead.
Toshi
More information about the Gcc
mailing list