This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH for [ARM] subsequent use of plus and minus operators could be improved
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Gábor Lóki <alga at rgai dot hu>
- Cc: Richard dot Earnshaw at arm dot com, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 07 Apr 2003 11:29:46 +0100
- Subject: Re: PATCH for [ARM] subsequent use of plus and minus operators could be improved
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Richard Earnshaw wrote:
> >>Should I attach the patch for the generic solution of the
> >>problem?
> >
> >
> > We need to see the patch.
> >
> > R.
>
> The patch is attached.
> This algorithm works in the postreload phase (register
> allocation algorithms produce the unnecessary plus/minus
> insn which is described in PR 10242). If I misplaced the
> code, correct me, please!
>
> I've only one comment on using this algorithm. It doesn't
> test if the combined constant can be stored in the target
> specific instruction. The flow2 phase is responsible for
> this testing, and it corrects the problem if necessary.
First of all, please read the documents on contributing to GCC and pay
particular attention to the coding standards sections. Patches can only
be accepted if they conform to these standards.
http://gcc.gnu.org/contribute.html
You should look to see if this code could be merged with one of the other
reload_cse passes so that we can avoid another scan through the entire RTL
of a function. One possible candidate here is reload_cse_move2add which
is looking for similar types of thing to fix up.
validate_change() can tell you if the substitution you made is correct
(and not do the transformation if the insn is not valid). You should only
kill the old insn if the change is successful.
>
> >
> > BTW. Have you filed a copyright assignment with the FSF?
> >
>
> We have sent the request.
You need to contact the Copyright Assignment Clerk at the FSF (IIRC
assign at gnu dot org). Explain what you want to contribute to and who will be
contributing; they can then send you the correct papers for you to sign.
R.