On Wed, 2009-12-23 at 10:11 +0530, Mohamed Shafi wrote: > 2009/12/22 Richard Earnshaw <rearn...@arm.com>: > > > > On Mon, 2009-12-21 at 18:44 +0000, Paul Brook wrote: > >> > > > I am doing a port in GCC 4.4.0 for a 32 bit target. As a part of > >> > > > scheduling framework i have to write the move patterns with more > >> > > > clarity, so that i could control the scheduling with the help of > >> > > > attributes. Re-writting the pattern resulted in movsi pattern with 41 > >> > > > alternatives :( > >> > > > >> > > Use rtl expressions instead of alternatives. e.g. arm.md:arith_shiftsi > >> > > >> > Or use the more modern iterators approach. > >> > >> Aren't iterators for generating multiple insns (e.g. movsi and movdi) from > >> the > >> same pattern, whereas in this case we have a single insn that needs to > >> accept > >> many different operand combinartions? > > > > Yes, but that is often better, I suspect, than having too fancy a > > pattern that breaks the optimization simplifications that genrecog does. > > > > Note that the attributes that were requested could be made part of the > > iterator as well, using a mode_attribute. > > > I can't find a back-end that does this. Can you show me a example?
I think the mips port is currently the most comprehensive example for use of iterators. R.