This is the mail archive of the gcc-patches@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: [PATCH/RFA] SH: work around insn duplication issues


kaz Kojima wrote:
> 
> Hi,
> 
> Here is an SH version of tne cannot_copy_insn_p target hook.
> I've tested the attached patch + rth's patch
> <URL:http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01308.html>
> on sh4-unknown-linux-gnu and there are no new regressions.
> Ok for mainline?
> 
> Regards,
>         kaz
> --
> 
> 2003-02-16  Kaz Kojima  <kkojima@gcc.gnu.org>
> 
>         * config/sh/sh.c (unspec_caller_rtx_p): New.
>         (sh_cannot_copy_insn_p): New.
>         (TARGET_CANNOT_COPY_INSN_P): New.

OK for now.

In order to allow basic block reordering in some of the
affected cases, we have to consider that the load can
be copied without the call, but the call cannot be copied
without the load.  Of course, if the load was duplicated first,
the call would have to be copied together with all the loads,
or not at all.  So we'd want to change the insn patterns to
reference each other (e.g. we could have an insn_list inside
the unspecs), and have a target hook that is kind of a copy
constructor that can fail.  The function used for the default
setting of that hook - plain copying with label mapping -
should be global so that it can be used to handle the ordinary
cases in the various target specific definitions for this hook.

-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


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