[PATCH] Modulo-scheduling improvements. Patch 2 of 2.
Andrey Belevantsev
abel@ispras.ru
Thu Aug 16 13:13:00 GMT 2007
Hello,
Revital1 Eres wrote:
> This is a re-submission of patch 2 of 2
> (http://gcc.gnu.org/ml/gcc-patches/2007-01/msg01470.html).
> It includes the comments received in -
> (*) http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01508.html,
> http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01582.html,
> http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01747.html and
> http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01674.html.
This patch still needs two of the fixes I mentioned in
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01007.html. First,
+ if (!INSN_P (PREV_INSN (insn)))
+ return NULL_RTX;
this will not recognize do-loops that have a NOTE immediately before the
jump, so you need either to skip notes or to resort to the case where a
jump is not a PARALLEL, if you are sure that the increment will be right
before it. Second, you still have to use expand_simple_binop like this:
+ rtx sub_reg = NULL_RTX;
+
+ sub_reg = expand_simple_binop (GET_MODE (count_reg), MINUS,
+ count_reg, GEN_INT (last_stage),
+ count_reg, 1, OPTAB_DIRECT);
+ gcc_assert (REG_P (sub_reg));
+ if (REGNO (sub_reg) != REGNO (count_reg))
+ emit_move_insn (count_reg, sub_reg);
Maybe there is a better way to do this, but this worked for us.
Mircea has mentioned that these fixes are fine on ppc, but you might
need to test them on spu. If you will incorporate them, I will retest
the patch on ia64.
Thanks for working on this!
Andrey
More information about the Gcc-patches
mailing list