large peephole2 speedup.
Zack Weinberg
zack@wolery.cumb.org
Tue Apr 11 20:00:00 GMT 2000
On Tue, Apr 11, 2000 at 06:27:03PM -0700, Richard Henderson wrote:
> On Tue, Apr 11, 2000 at 05:39:40PM -0700, Richard Henderson wrote:
> > You could instrument genconfig to emit a variable in the same
> > vein as MAX_INSNS_PER_SPLIT that counts the maximum number of
> > input insns to a peephole2 pattern.
>
> Expanding on this, one could have an array
>
> regset peep2_live_at[MAX_INSNS_PER_PEEP2+1];
>
> peep2_live_at[N] is the set of live registers before the Nth insn
> in the matched sequence. As you search for matches, you shift
> each regset down one slot, recycling them at the end. Or probably
> better, don't actually shift the regsets, just have a "current offset"
> and do modulo addressing.
>
> Now you're not analysing any insn more than once.
This could work. I'll look at it in the next few days.
zw
More information about the Gcc-patches
mailing list