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]

patch for mainline to fix modulo scheduling.


There are currently (at least) two bugs with modulo scheduling.
This patch fixes one of the bugs that introduced in
http://gcc.gnu.org/ml/gcc-cvs/2006-01/msg00375.html.

There I accidentally converted the use of the reaching uses gen set to
the use of the reaching defs gen set in ddg.c (add_deps_for_def).  This
patch reverses that change.  This bug causes various ices when compiling
with -fmodulo-schedule and some changes (mostly bad) in schedules generated.

However, there is an earlier (before jan 11) bug that also breaks modulo
scheduling (on at least powerpc).  Janis has her massive computing
resources looking for the offending patch at this very moment. 

This patch, once approved, should not be committed until the first bug
is fixed because the first bug, by itself tickles the north (or is it
south)bridge failure on Mac G5 when running the regression tests and
this failure causes the machine to crash. 

I do not think that Janis has a bugzilla for this, she should correct me
if I am wrong. 

2006-05-03  Kenneth Zadeck  <zadeck@naturalbridge.com>
    * ddg.c (add_deps_for_def): Converted use of reaching defs to    
        reaching uses and fixed space problem.
   


I am personally of the opinion that gcc should not have passes that are
only enabled by command line options.  These passes tend to be grossly
undertested. 


Index: ddg.c
===================================================================
--- ddg.c	(revision 113438)
+++ ddg.c	(working copy)
@@ -225,7 +225,7 @@ static void
 add_deps_for_def (ddg_ptr g, struct df *df, struct df_ref *rd)
 {
   int regno = DF_REF_REGNO (rd);
-  struct df_rd_bb_info *bb_info = DF_RD_BB_INFO (df, g->bb);
+  struct df_ru_bb_info *bb_info = DF_RU_BB_INFO (df, g->bb);
   struct df_link *r_use;
   int use_before_def = false;
   rtx def_insn = DF_REF_INSN (rd);
@@ -338,7 +338,7 @@ build_inter_loop_deps (ddg_ptr g, struct
 
       /* We are interested in uses of this BB.  */
       if (BLOCK_FOR_INSN (use->insn) == g->bb)
-      	add_deps_for_use (g, df,use);
+      	add_deps_for_use (g, df, use);
     }
 }
 

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