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]

[dataflow]: First round of getting ia-64 working.


This fixes everything that I can find by crosscompiling on my home
machine.  Now it is time for the real debugging on the hp machines. 
There is no expectation at this point that the dataflow branch really
works on the ia-64.

Kenny


2006-08-01  Kenneth Zadeck <zadeck@naturalbridge.com>

    * sched-ebb.c (sched_ebbs): Now returns the df instance created.
    * rtl.h (sched_ebbs): Ditto.
    * recog.c (split_all_insns): Made public again so it can be called
    from ia64.c
    * rtl.h (split_all_insns): Ditto.
    * df-problems.c (df_ri_compute): Removed call to non existent
    function.
    * config/ia64/ia64.c (emit_predicate_relation_info): Added df
    parameter and removed rotten ref to global instance.
    (ia64_reorg): Added local instance of df and removed calls to non
    existent flow.c.

Index: sched-ebb.c
===================================================================
--- sched-ebb.c	(revision 115812)
+++ sched-ebb.c	(working copy)
@@ -537,7 +537,7 @@ schedule_ebb (struct df *df, rtx head, r
 
 /* The one entry point in this file.  */
 
-void
+struct df *
 schedule_ebbs (void)
 {
   basic_block bb;
@@ -637,6 +637,7 @@ schedule_ebbs (void)
     rm_redundant_line_notes ();
 
   sched_finish ();
+  return df;
 }
 
 /* INSN has been added to/removed from current ebb.  */
Index: recog.c
===================================================================
--- recog.c	(revision 115812)
+++ recog.c	(working copy)
@@ -2562,7 +2562,7 @@ split_insn (rtx insn)
 
 /* Split all insns in the function.  If UPD_LIFE, update life info after.  */
 
-static void
+void
 split_all_insns (void)
 {
   sbitmap blocks;
Index: rtl.h
===================================================================
--- rtl.h	(revision 115812)
+++ rtl.h	(working copy)
@@ -1779,6 +1779,8 @@ extern const char *decode_asm_operands (
 extern enum reg_class reg_preferred_class (int);
 extern enum reg_class reg_alternate_class (int);
 
+extern void split_all_insns (void);
+
 #define MAX_SAVED_CONST_INT 64
 extern GTY(()) rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
 
@@ -2098,7 +2100,7 @@ struct df;
 extern void schedule_insns (void);
 
 /* In sched-ebb.c.  */
-extern void schedule_ebbs (void);
+extern struct df *schedule_ebbs (void);
 
 /* In haifa-sched.c.  */
 extern void fix_sched_param (const char *, const char *);
Index: df-problems.c
===================================================================
--- df-problems.c	(revision 115812)
+++ df-problems.c	(working copy)
@@ -4103,10 +4103,7 @@ df_ri_compute (struct dataflow *dflow, b
 
 #ifdef REG_DEAD_DEBUGGING
   if (dump_file)
-    {
-      df_lr_dump (dflow->df->problems_by_index [DF_LR], dump_file);
-      print_rtl_with_bb (dump_file, get_insns());
-    }
+    print_rtl_with_bb (dump_file, get_insns());
 #endif
 
   EXECUTE_IF_SET_IN_BITMAP (blocks_to_scan, 0, bb_index, bi)
Index: config/ia64/ia64.c
===================================================================
--- config/ia64/ia64.c	(revision 115812)
+++ config/ia64/ia64.c	(working copy)
@@ -200,7 +200,7 @@ static struct machine_function * ia64_in
 static void emit_insn_group_barriers (FILE *);
 static void emit_all_insn_group_barriers (FILE *);
 static void final_emit_insn_group_barriers (FILE *);
-static void emit_predicate_relation_info (void);
+static void emit_predicate_relation_info (struct df *);
 static void ia64_reorg (void);
 static bool ia64_in_small_data_p (tree);
 static void process_epilogue (FILE *, rtx, bool, bool);
@@ -8348,7 +8348,7 @@ ia64_produce_address_p (rtx insn)
    straight-line code.  */
 
 static void
-emit_predicate_relation_info (void)
+emit_predicate_relation_info (struct df *df)
 {
   basic_block bb;
 
@@ -8367,7 +8367,7 @@ emit_predicate_relation_info (void)
       /* Skip p0, which may be thought to be live due to (reg:DI p0)
 	 grabbing the entire block of predicate registers.  */
       for (r = PR_REG (2); r < PR_REG (64); r += 2)
-	if (REGNO_REG_SET_P (DF_LIVE_IN (rtl_df, bb), r))
+	if (REGNO_REG_SET_P (DF_LIVE_IN (df, bb), r))
 	  {
 	    rtx p = gen_rtx_REG (BImode, r);
 	    rtx n = emit_insn_after (gen_pred_rel_mutex (p), head);
@@ -8411,17 +8411,15 @@ emit_predicate_relation_info (void)
 static void
 ia64_reorg (void)
 {
+  struct df *df;
+
   /* We are freeing block_for_insn in the toplev to keep compatibility
      with old MDEP_REORGS that are not CFG based.  Recompute it now.  */
   compute_bb_for_insn ();
 
   /* If optimizing, we'll have split before scheduling.  */
   if (optimize == 0)
-    split_all_insns (0);
-
-  /* ??? update_life_info_in_dirty_blocks fails to terminate during
-     non-optimizing bootstrap.  */
-  update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES, PROP_DEATH_NOTES);
+    split_all_insns ();
 
   if (optimize && ia64_flag_schedule_insns2)
     {
@@ -8497,7 +8495,10 @@ ia64_reorg (void)
 	  _1mfb_ = get_cpu_unit_code ("1b_1mfb.");
 	  _1mlx_ = get_cpu_unit_code ("1b_1mlx.");
 	}
-      schedule_ebbs ();
+      df = schedule_ebbs ();
+      /* We cannot reuse this one because it has been corrupted by the
+	 evil glat.  */
+      df_finish (df);
       finish_bundle_states ();
       if (ia64_tune == PROCESSOR_ITANIUM)
 	{
@@ -8514,6 +8515,10 @@ ia64_reorg (void)
   else
     emit_all_insn_group_barriers (dump_file);
 
+  df = df_init (DF_HARD_REGS);
+  df_live_add_problem (df, 0);
+  df_analyze (df);
+ 
   /* A call must not be the last instruction in a function, so that the
      return address is still within the function, so that unwinding works
      properly.  Note that IA-64 differs from dwarf2 on this point.  */
@@ -8542,7 +8547,7 @@ ia64_reorg (void)
 	}
     }
 
-  emit_predicate_relation_info ();
+  emit_predicate_relation_info (df);
 
   if (ia64_flag_var_tracking)
     {
@@ -8550,6 +8555,7 @@ ia64_reorg (void)
       variable_tracking_main ();
       timevar_pop (TV_VAR_TRACKING);
     }
+  df_finish (df);
 }
 
 /* Return true if REGNO is used by the epilogue.  */

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