Re: How to implement pattens with more that 30 alternatives

2009-12-23 Thread Richard Earnshaw
On Wed, 2009-12-23 at 10:11 +0530, Mohamed Shafi wrote: > 2009/12/22 Richard Earnshaw : > > > > On Mon, 2009-12-21 at 18:44 +, 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 mo

Re: How to implement pattens with more that 30 alternatives

2009-12-22 Thread Mohamed Shafi
2009/12/22 Richard Earnshaw : > > On Mon, 2009-12-21 at 18:44 +, 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 th

Re: How to implement pattens with more that 30 alternatives

2009-12-22 Thread Martin Guy
On 12/22/09, Daniel Jacobowitz wrote: > Interesting, I knew you had a lot of Cirrus patches but I didn't > realize the state of the checked-in code was so bad. > > Is what's there useful or actively harmful? Neither useful nor harmful except in that it adds noise to the arm backend. It's useful

Re: How to implement pattens with more that 30 alternatives

2009-12-22 Thread Daniel Jacobowitz
On Tue, Dec 22, 2009 at 04:24:01PM +, Martin Guy wrote: > I wouldn't bother implementaing that if the VFP/Cirrus conflict is the > only thing that needs that. > GCC's has never been able to generate working code for Cirrus > MaverickCrunch for over a dozen separate reasons, from incorrect use >

Re: How to implement pattens with more that 30 alternatives

2009-12-22 Thread Martin Guy
On 12/22/09, Daniel Jacobowitz wrote: > in a patch I'm working on for ARM cmpdi patterns, I ended up needing > "cmpdi_lhs_operand" and "cmpdi_rhs_operand" predicates because Cirrus > and VFP targets accept different constants. Automatically generating > that would be a bit excessive though.

Re: How to implement pattens with more that 30 alternatives

2009-12-22 Thread Daniel Jacobowitz
On Tue, Dec 22, 2009 at 02:12:48PM +, Richard Earnshaw wrote: > There is. Look at attribute "enabled". > > I've not worked out how to use that properly yet, but it is used in the > m68k back-end. Interesting. This seems to replace needing either (A) a bunch of similar patterns with differen

Re: How to implement pattens with more that 30 alternatives

2009-12-22 Thread Richard Earnshaw
On Tue, 2009-12-22 at 09:10 -0500, Daniel Jacobowitz wrote: > On Tue, Dec 22, 2009 at 12:09:55PM +, Paul Brook wrote: > > i.e. the following will work as expected: > > > > (define_insn "*my_movsi" > > (set (match_operand:SI "..." "=a,b") > > (match_operand:SI "..." "ab,ab"))) > > >

Re: How to implement pattens with more that 30 alternatives

2009-12-22 Thread Daniel Jacobowitz
On Tue, Dec 22, 2009 at 12:09:55PM +, Paul Brook wrote: > i.e. the following will work as expected: > > (define_insn "*my_movsi" > (set (match_operand:SI "..." "=a,b") > (match_operand:SI "..." "ab,ab"))) > > However the following will not. Once gcc has picked a particular insn > (

Re: How to implement pattens with more that 30 alternatives

2009-12-22 Thread Paul Brook
> > > 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

Re: How to implement pattens with more that 30 alternatives

2009-12-22 Thread Richard Earnshaw
On Mon, 2009-12-21 at 18:44 +, 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-wri

Re: How to implement pattens with more that 30 alternatives

2009-12-21 Thread Paul Brook
> > > 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 > > > alte

Re: How to implement pattens with more that 30 alternatives

2009-12-21 Thread Richard Earnshaw
On Mon, 2009-12-21 at 16:06 +, Paul Brook wrote: > On Monday 21 December 2009, Mohamed Shafi wrote: > > Hi all, > > > > 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 th

Re: How to implement pattens with more that 30 alternatives

2009-12-21 Thread Paul Brook
On Monday 21 December 2009, Mohamed Shafi wrote: > Hi all, > > 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 patter

How to implement pattens with more that 30 alternatives

2009-12-21 Thread Mohamed Shafi
Hi all, 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 :( When i s