This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Very long alternative lists for RTL patterns like move


On Mon, Mar 14, 2016 at 01:35:30PM -0600, Jeff Law wrote:
> >(define_insn "mov<mode>_hardfloat"
> >   [(set (match_operand:FMOVE32 0 "nonimmediate_operand" 
> >   "=!r,!r,m,f,<f32_vsx>,<f32_vsx>,!r,<f32_lr>,<f32_lr2>,<f32_sm>,<f32_sm2>,<f32_av>,Z,?<f32_dm>,?r,*c*l,!r,*h")
> >	(match_operand:FMOVE32 1 "input_operand" 
> >	"r,m,r,f,<f32_vsx>,j,j,<f32_lm>,<f32_lm2>,<f32_sr>,<f32_sr2>,Z,<f32_av>,r,<f32_dm>,r,h,0"))]
> >   "(gpc_reg_operand (operands[0], <MODE>mode)
> >    || gpc_reg_operand (operands[1], <MODE>mode))
> >    && (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"

We can get rid of the very many different mov patterns (or at least limit
it somewhat) by not doing a condition like this, instead using the
"enabled" attribute?

> >The problem is you have count each alternative to get things to line up.
> >
> >One thing that I do when editing rs6000.md is make the columns line up 
> >between
> >the different operands, and then edit it with a very wide emacs screen, for
> >example:

You can split a string over multiple lines just fine, as well.  That again
becomes unreadable if you need too many lines, of course :-(

> >One thought I've had is to have a define_alternative meta patterns.  
> >Something like:
> >
> Can't hurt to try.
> 
> The other thing to ponder is whether or not we have to continue to have 
> a single movXX insn handle all the possible constraints in a world where 
> we're using LRA rather than reload.

It is still needed with current IRA/LRA, but perhaps that can be changed.
That would be lovely!  (add<mode>3 is still a bit special as well?)


Segher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]