[PATCH] Modulo-scheduling improvements. Patch 2 of 2. (re-submission)

Revital1 Eres ERES@il.ibm.com
Mon Aug 27 13:16:00 GMT 2007


Hello,

Regarding the following -

> > +  for (insn = head; insn != PREV_INSN (tail); insn = NEXT_INSN (insn))
> > +    if ((found = reg_mentioned_p (reg, insn)) == true)
>                                                  ^^^^^^^ redundant

I received an error/warning trying to remove it; so I left it as is.

> Suggest to combine the two checks, e.g. by:
>
> +  first_insn_not_to_check = (GET_CODE (PATTERN (tail)) == PARALLEL ?
tail :
> PREV_INSN (tail));
> +

I'll address this in next patch.

Attached is the version I intend to commit once I'll get the final OK
for the spu.md part.

Thanks,
Revital

(See attached file: patch_sms_27_patch_2_of_2.txt)

2007-08-27  Mircea Namolaru  <namolaru@il.ibm.com>
            Vladimir Yanovsky  <yanov@il.ibm.com>
            Revital Eres  <eres@il.ibm.com>
            Andrey Belevantsev  <abel@ispras.ru>

        * config/spu/spu.md: Recognize doloop pattern when -fmodulo-sched
        is set.
        * modulo-sched.c: Add documentation regarding do-loop.
        (doloop_register_get): Change number of arguments to support
        the new do-loop pattern and check whether COUNT_REG has no other
        occurences in the loop besides in the control part.
        (duplicate_insns_of_cycles): Do not duplicate the insn which
        changes count_reg as it is already adjusted.
        (generate_prolog_epilog): New argument to support the new
        do-loop pattern.  Change the subtract instruction to use
        expand_simple_binop.  Call duplicate_insns_of_cycles with new
        argument.
        (sms_schedule): Call doloop_register_get and
        generate_prolog_epilog with new argument.  Do not handle loops
        with single sets insns with subreg in their lhs.
        * loop-doloop.c (doloop_optimize): Support for another do-loop
        pattern.
        (doloop_condition_get): Gets an instruction instead of a pattern
        and change the return condition when the do-loop pattern is
        not parallel.
        * ddg.c (create_ddg_dep_from_intra_loop_link): Handle only reg
        deps when considering to not create edges.

        * gcc.dg/sms-1.c: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_sms_27_patch_2_of_2.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070827/2b4f6565/attachment.txt>


More information about the Gcc-patches mailing list