On Thu, Apr 18, 2013 at 12:58 PM, Bernd Schmidt wrote:
> In general I think if a new target wants more than one delay slot, it
> should try to use the C6X method instead of reorg.c. It would be nice
> for someone to try it on a target like mips or PA as well;

Agreed on both points. I actually considered this first, but it's a
little involved because you have to somehow model nullified branches
on targets that don't have predication support. Just the
INSN_FROM_TARGET flag isn't good enough, and wrapping insns in
annulling branch delay slots in a COND_EXEC would require some changes
in recog that I didn't really like.

I think that it would be hard to put all of the smarts of reorg in the
scheduler proper. For all its ugliness, AFAICT reorg is remarkably
effective for targets with a single delay slot, with its
"opposite-arithmetic" trick, "un-PRE" around loops, code hoisting and
redundancy elimination, etc. My new toy scheduler can't compete unless
I implement at least a few of these tricks (but hopefully a little
cleaner)...

Ciao!
Steven

Reply via email to