Hello, This patch is the third one in the series of patches originated from patch 1 of 2 (http://gcc.gnu.org/ml/gcc-patches/2007-01/msg01468.html). A reminder - here is the list of issues patch 1 of 2 addresses: 1.1 Avoid SMS when the loop contains inc instruction. (commited) 1.2 Fix removal of anti-deps. (commited) 1.3 Add -fsms-allow-reg-moves flag. (commited) 1.4 Fix order of instructions within one cycle. 1.5 Remove profitability checks. The attached patch addresses items 1.4 and 1.5 above. It also adds dump information. A new reduced Fortran testcase for forall_10.f90 test (sms-2.f90) was added; this testcase failed with -fmodulo-sched flag when the current patch is not applied. It caused by applying wrong order of instructions within one cycle which is fixed in the current patch. :ADDPATCH middle-end (modulo-sched): This patch was bootstrapped and tested on PPC and x86_64 (also with --enable-checking=assert), with and without -fmodulo-sched-allow-regmoves flag; with no new regressions. OK for mainline? Thanks, Revital 2007-08-07 Vladimir Yanovsky * ddg.c (print_ddg): Add dump information. * modulo-sched.c (print_node_sched_params): Add parameter and verbosity. (calculate_maxii): Remove function. (undo_generate_reg_moves): Likewise. (undo_permute_partial_schedule): Likewise. (kernel_number_of_cycles): Likewise. (MAXII_FACTOR): New definition to calculate the upper bound of II. (sms_schedule): Use it. Remove profitability checks. (sms_schedule_by_order): Fix order of nodes within the cycle. * gfortran.dg/sms-1.f90: Add comment. * gfortran.dg/sms-2.f90: New. (See attached file: patch_1_of_2.txt)