This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Very long alternative lists for RTL patterns like move
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc-help at gcc dot gnu dot org, dje dot gcc at gmail dot com, richard dot earnshaw at arm dot com, rguenther at suse dot de, rth at redhat dot com, jakub at redhat dot com, joseph at codesourcery dot com, bschmidt at redhat dot com, wilson at tuliptree dot org, marcus dot shawcroft at arm dot com, ubizjak at gmail dot com, hubicka at ucw dot cz, nickc at redhat dot com, uweigand at de dot ibm dot com, Andreas dot Krebbel at de dot ibm dot com, vmakarov at redhat dot com, wschmidt at linux dot vnet dot ibm dot com, rdsandiford at googlemail dot com
- Date: Mon, 14 Mar 2016 14:55:40 -0500
- Subject: Re: RFC: Very long alternative lists for RTL patterns like move
- Authentication-results: sourceware.org; auth=none
- References: <20160314192950 dot GA20247 at ibm-tiger dot the-meissners dot org> <56E71282 dot 1030005 at redhat dot com>
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