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]: PATCH: Move df flags to single place.


The flags in the df structure were specific to each problem.  They have
now been moved so that they are shared by all problems. 

2006-09-30  Kenneth Zadeck <zadeck@naturalbridge.com>
    * df-scan.c (problem_SCAN): Removed flags.
    (df_scan_add_problem): Ditto.
    (df_ref_record, df_insn_refs_record, df_bb_refs_record,
    df_refs_record, df_record_entry_block_defs,
    df_record_exit_block_uses ): Moved flags to df structure.
    * df-core.c (df_init): Added permanent_flags and changeable_flags.
    (df_add_problem): Removed flags parameter.
    (df_set_flags, df_clear_flags): Changed processing of flags.  *
    df.h (df_dependent_problem_function, struct df_problem): Removed
    flags.
    (DF_HARD_REGS, DF_EQUIV_NOTES, DF_SUBREGS, DF_DU_CHAIN,
    DF_UD_CHAIN, DF_RI_LIFE, DF_RI_SETJMP): Changed to be fields in
    df_permanent_flags.
    (DF_LR_RUN_DCE): Changed to be fields in df_changeable_flags.
    (df_init, df_add_problem, df_set_flags, df_clear_flags,
    df_ru_add_problem, df_rd_add_problem, df_lr_add_problem,
    df_ur_add_problem, df_live_add_problem, df_urec_add_problem,
    df_chain_add_problem, df_ri_add_problem, df_scan_add_problem):
    Changed flag parameters.
    * df-problems.c (problem_RU, problem_RD, problem_LR, problem_UR,
    problem_LIVE, problem_UREC, problem_CHAIN, problem_RI): Removed
    changeable flags field.
    (df_ru_add_problem, df_rd_add_problem, df_lr_add_problem,
    df_ur_add_problem, df_live_add_problem, df_urec_add_problem,
    df_chain_add_problem, df_ri_add_problem): Removed flags parameter.
    (df_lr_local_finalize, df_chain_alloc, df_chain_insn_reset,
    df_chain_bb_reset, df_chain_create_bb_process_use,
    df_chain_start_dump, df_ri_alloc, df_ri_bb_compute, df_ri_compute,
    df_ri_free): Changed location of flags.
    * dce.c (init_dce): Moved flags from df_*_add_problem to df_init.
    (fast_dce): Changed parameters to df_set_flags and df_clear_flags.
    * reg_stack.c (reg_to_stack): Moved flags from df_*_add_problem to
df_init.
    * sched_rgn.c (sched_insns): Ditto.
    * regrename.c (regrename_optimize): Ditto.
    * sched_ebb.c (schedule_ebbs): Ditto.
    * fwprop.c (fwprop_init): Ditto.
    * see.c (see_initialize_data_structures): Ditto.
    * auto_inc_dec.c (rest_of_handle_auto_inc_dec): Ditto.
    * mode-switching.c (optimize_mode_switching): Ditto.
    * modulo-sched.c (sms_schedule): Ditto.
    * web.c (web_main): Ditto.
    * ifcvt.c (if_convert): Ditto.
    * recog.c (peephole2_optimize): Ditto.
    * regmove.c (regmove_optimize, rest_of_handle_stack_adjustments):
    Ditto.
    * local_alloc.c (rest_of_handle_local_alloc): Ditto.
    * function.c (thread_prologue_and_epilogue_insns): Ditto.
    * rtl_factoring.c (rtl_sequabstr): Ditto.
    * bt_load.c (branch_target_load_optimize): Ditto.
    * loop_invariant.c (move_loop_invariants): Ditto.
    * subregs-init.c (initialize_uninitialized_subregs): Ditto.
    * loop-iv.c (iv_analysis_loop_init): Ditto.
    * combine.c (rest_of_handle_combine): Ditto.
    

Index: gcc/df-scan.c
===================================================================
--- gcc/df-scan.c	(revision 117304)
+++ gcc/df-scan.c	(working copy)
@@ -338,8 +338,7 @@ static struct df_problem problem_SCAN =
   df_scan_start_dump,         /* Debugging.  */
   NULL,                       /* Debugging start block.  */
   NULL,                       /* Debugging end block.  */
-  NULL,                       /* Dependent problem.  */
-  0                           /* Changeable flags.  */
+  NULL                        /* Dependent problem.  */
 };
 
 
@@ -348,9 +347,9 @@ static struct df_problem problem_SCAN =
    solution.  */
 
 struct dataflow *
-df_scan_add_problem (struct df *df, int flags)
+df_scan_add_problem (struct df *df)
 {
-  return df_add_problem (df, &problem_SCAN, flags);
+  return df_add_problem (df, &problem_SCAN);
 }
 
 /*----------------------------------------------------------------------------
@@ -1069,7 +1068,7 @@ df_ref_record (struct dataflow *dflow, r
      reg.  As written in the docu those should have the form
      (subreg:SI (reg:M A) N), with size(SImode) > size(Mmode).
      XXX Is that true?  We could also use the global word_mode variable.  */
-  if ((dflow->flags & DF_SUBREGS) == 0
+  if ((df->permanent_flags & DF_SUBREGS) == 0
       && GET_CODE (reg) == SUBREG
       && (GET_MODE_SIZE (GET_MODE (reg)) < GET_MODE_SIZE (word_mode)
 	  || GET_MODE_SIZE (GET_MODE (reg))
@@ -1089,7 +1088,7 @@ df_ref_record (struct dataflow *dflow, r
       struct df_scan_problem_data *problem_data
 	= (struct df_scan_problem_data *) dflow->problem_data;
 
-      if (!(dflow->flags & DF_HARD_REGS))
+      if (!(df->permanent_flags & DF_HARD_REGS))
 	return;
 
       /* GET_MODE (reg) is correct here.  We do not want to go into a SUBREG
@@ -1538,7 +1537,7 @@ df_insn_refs_record (struct dataflow *df
       /* Record register defs.  */
       df_defs_record (dflow, PATTERN (insn), bb, insn, 0);
 
-      if (dflow->flags & DF_EQUIV_NOTES)
+      if (df->permanent_flags & DF_EQUIV_NOTES)
 	for (note = REG_NOTES (insn); note;
 	     note = XEXP (note, 1))
 	  {
@@ -1591,7 +1590,7 @@ df_insn_refs_record (struct dataflow *df
 			  DF_REF_REG_USE, bb, insn, 
 			  DF_REF_CALL_STACK_USAGE);
 
-	  if (dflow->flags & DF_HARD_REGS)
+	  if (df->permanent_flags & DF_HARD_REGS)
 	    {
 	      bitmap_iterator bi;
 	      unsigned int ui;
@@ -1664,7 +1663,7 @@ df_bb_refs_record (struct dataflow *dflo
   struct df_scan_bb_info *bb_info = df_scan_get_bb_info (dflow, bb->index);
   bitmap artificial_uses_at_bottom = NULL;
 
-  if (dflow->flags & DF_HARD_REGS)
+  if (df->permanent_flags & DF_HARD_REGS)
     artificial_uses_at_bottom = BITMAP_ALLOC (NULL);
 
   /* Need to make sure that there is a record in the basic block info. */  
@@ -1690,7 +1689,7 @@ df_bb_refs_record (struct dataflow *dflo
     }
 
 #ifdef EH_RETURN_DATA_REGNO
-  if ((dflow->flags & DF_HARD_REGS)
+  if ((df->permanent_flags & DF_HARD_REGS)
       && df_has_eh_preds (bb))
     {
       unsigned int i;
@@ -1733,7 +1732,7 @@ df_bb_refs_record (struct dataflow *dflo
     }
 #endif
 
-  if ((dflow->flags & DF_HARD_REGS) 
+  if ((df->permanent_flags & DF_HARD_REGS) 
       && bb->index >= NUM_FIXED_BLOCKS)
     {
       bitmap_iterator bi;
@@ -1763,7 +1762,7 @@ df_refs_record (struct dataflow *dflow, 
   bitmap_clear (df->regular_block_artificial_uses);
   bitmap_clear (df->eh_block_artificial_uses);
 
-  if (dflow->flags & DF_HARD_REGS)
+  if (df->permanent_flags & DF_HARD_REGS)
     {
       /* The following code (down thru the arg_pointer seting APPEARS
 	 to be necessary because there is nothing that actually
@@ -1866,7 +1865,7 @@ df_record_entry_block_defs (struct dataf
 
   bitmap_clear (df->entry_block_defs);
 
-  if (!(dflow->flags & DF_HARD_REGS))
+  if (!(df->permanent_flags & DF_HARD_REGS))
     return;
 
   for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
@@ -1978,7 +1977,7 @@ df_record_exit_block_uses (struct datafl
 
   bitmap_clear (df->exit_block_uses);
   
-  if (!(dflow->flags & DF_HARD_REGS))
+  if (!(df->permanent_flags & DF_HARD_REGS))
     return;
 
   /* If exiting needs the right stack value, consider the stack
@@ -2079,7 +2078,7 @@ df_record_exit_block_uses (struct datafl
   /* Mark function return value.  */
   diddle_return_value (df_mark_reg, (void*) df->exit_block_uses);
 
-  if (dflow->flags & DF_HARD_REGS)
+  if (df->permanent_flags & DF_HARD_REGS)
     EXECUTE_IF_SET_IN_BITMAP (df->exit_block_uses, 0, i, bi)
       df_uses_record (dflow, &regno_reg_rtx[i], 
   		      DF_REF_REG_USE, EXIT_BLOCK_PTR, NULL,
Index: gcc/df-core.c
===================================================================
--- gcc/df-core.c	(revision 117304)
+++ gcc/df-core.c	(working copy)
@@ -315,16 +315,19 @@ static void df_set_bb_info (struct dataf
    memory.  */
 
 struct df *
-df_init (int flags)
+df_init (enum df_permanent_flags permanent_flags, 
+	 enum df_changeable_flags changeable_flags)
 {
   struct df *df = XCNEW (struct df);
 
+  df->permanent_flags = permanent_flags;
+  df->changeable_flags = changeable_flags;
   /* This is executed once per compilation to initialize platform
      specific data structures. */
   df_hard_reg_init ();
-  
+
   /* All df instance must define the scanning problem.  */
-  df_scan_add_problem (df, flags);
+  df_scan_add_problem (df);
 
   /* There should not be more than one active instance of df.  */
 
@@ -337,13 +340,13 @@ df_init (int flags)
 /* Add PROBLEM to the DF instance.  */
 
 struct dataflow *
-df_add_problem (struct df *df, struct df_problem *problem, int flags)
+df_add_problem (struct df *df, struct df_problem *problem)
 {
   struct dataflow *dflow;
 
   /* First try to add the dependent problem. */
   if (problem->dependent_problem_fun)
-    (problem->dependent_problem_fun) (df, 0);
+    (problem->dependent_problem_fun) (df);
 
   /* Check to see if this problem has already been defined.  If it
      has, just return that instance, if not, add it to the end of the
@@ -354,7 +357,6 @@ df_add_problem (struct df *df, struct df
 
   /* Make a new one and add it to the end.  */
   dflow = XCNEW (struct dataflow);
-  dflow->flags = flags;
   dflow->df = df;
   dflow->problem = problem;
   dflow->computed = false;
@@ -368,33 +370,27 @@ df_add_problem (struct df *df, struct df
 /* Set the MASK flags in the DFLOW problem.  The old flags are
    returned.  If a flag is not allowed to be changed this will fail if
    checking is enabled.  */
-int 
-df_set_flags (struct dataflow *dflow, int mask)
+enum df_changeable_flags
+df_set_flags (struct df *df, enum df_changeable_flags changeable_flags)
 {
-  int old_flags = dflow->flags;
-
-  gcc_assert (!(mask & (~dflow->problem->changeable_flags)));
-
-  dflow->flags |= mask;
-
+  enum df_changeable_flags old_flags = df->changeable_flags;
+  df->changeable_flags |= changeable_flags;
   return old_flags;
 }
 
+
 /* Clear the MASK flags in the DFLOW problem.  The old flags are
    returned.  If a flag is not allowed to be changed this will fail if
    checking is enabled.  */
-int 
-df_clear_flags (struct dataflow *dflow, int mask)
+enum df_changeable_flags
+df_clear_flags (struct df *df, enum df_changeable_flags changeable_flags)
 {
-  int old_flags = dflow->flags;
-
-  gcc_assert (!(mask & (~dflow->problem->changeable_flags)));
-
-  dflow->flags &= !mask;
-
+  enum df_changeable_flags old_flags = df->changeable_flags;
+  df->changeable_flags &= !changeable_flags;
   return old_flags;
 }
 
+
 /* Set the blocks that are to be considered for analysis.  If this is
    not called or is called with null, the entire function in
    analyzed.  */
Index: gcc/df.h
===================================================================
--- gcc/df.h	(revision 117304)
+++ gcc/df.h	(working copy)
@@ -182,7 +182,7 @@ typedef void (*df_dump_bb_problem_functi
 
 /* Function to add problem a dataflow problem that must be solved
    before this problem can be solved.  */
-typedef struct dataflow * (*df_dependent_problem_function) (struct df *, int);
+typedef struct dataflow * (*df_dependent_problem_function) (struct df *);
 
 /* The static description of a dataflow problem to solve.  See above
    typedefs for doc for the function fields.  */
@@ -207,9 +207,6 @@ struct df_problem {
   df_dump_bb_problem_function dump_top_fun;
   df_dump_bb_problem_function dump_bottom_fun;
   df_dependent_problem_function dependent_problem_fun;
-
-  /* Flags can be changed after analysis starts.  */
-  int changeable_flags;
 };
 
 
@@ -230,22 +227,6 @@ struct dataflow
   /* The pool to allocate the block_info from. */
   alloc_pool block_pool;                
 
-  /* Problem specific control infomation.  */
-
-  /* Scanning flags.  */
-#define DF_HARD_REGS	     1	/* Mark hard registers.  */
-#define DF_EQUIV_NOTES	     2	/* Mark uses present in EQUIV/EQUAL notes.  */
-#define DF_SUBREGS	     4	/* Return subregs rather than the inner reg.  */
-  /* Flag to control the running of dce as a side effect of building LR.  */
-#define DF_LR_RUN_DCE        1    /* Run DCE.  */
-  /* Flags that control the building of chains.  */
-#define DF_DU_CHAIN          1    /* Build DU chains.  */  
-#define DF_UD_CHAIN          2    /* Build UD chains.  */
-  /* Flag to control the building of register info.  */
-#define DF_RI_LIFE           1    /* Build register info.  */
-#define DF_RI_SETJMP         2    /* Build pseudos that cross setjmp info.  */
-  int flags;
-
   /* Other problem specific data that is not on a per basic block
      basis.  The structure is generally defined privately for the
      problem.  The exception being the scanning problem where it is
@@ -353,6 +334,28 @@ struct df_ref_info
 };
 
 
+enum df_permanent_flags 
+{
+  /* Scanning flags.  */
+  DF_HARD_REGS     =  1, /* Mark hard registers.  */
+  DF_EQUIV_NOTES   =  2, /* Mark uses present in EQUIV/EQUAL notes.  */
+  DF_SUBREGS       =  4, /* Return subregs rather than the inner reg.  */
+  /* Flags that control the building of chains.  */
+  DF_DU_CHAIN      =  8, /* Build DU chains.  */  
+  DF_UD_CHAIN      = 16, /* Build UD chains.  */
+  /* Flag to control the building of register info.  */
+  DF_RI_LIFE       = 32, /* Build register info.  */
+  DF_RI_SETJMP     = 64  /* Build pseudos that cross setjmp info.  */
+};
+
+enum df_changeable_flags 
+{
+  /* Scanning flags.  */
+  /* Flag to control the running of dce as a side effect of building LR.  */
+  DF_LR_RUN_DCE    = 1   /* Run DCE.  */
+};
+
+
 /*----------------------------------------------------------------------------
    Problem data for the scanning dataflow problem.  Unlike the other
    dataflow problems, the problem data for scanning is fully exposed and
@@ -402,6 +405,10 @@ struct df
   bitmap exit_block_uses;        /* The set of hardware registers used in exit block.  */
   int *postorder;                /* The current set of basic blocks in postorder.  */
   int n_blocks;                  /* The number of blocks in postorder.  */
+
+  /* Problem specific control infomation.  */
+  enum df_permanent_flags permanent_flags;
+  enum df_changeable_flags changeable_flags;
 };
 
 #define DF_SCAN_BB_INFO(DF, BB) (df_scan_get_bb_info((DF)->problems_by_index[DF_SCAN],(BB)->index))
@@ -625,10 +632,10 @@ extern struct df *df_current_instance;
 
 /* Functions defined in df-core.c.  */
 
-extern struct df *df_init (int);
-extern struct dataflow *df_add_problem (struct df *, struct df_problem *, int);
-extern int df_set_flags (struct dataflow *, int);
-extern int df_clear_flags (struct dataflow *, int);
+extern struct df *df_init (enum df_permanent_flags, enum df_changeable_flags);
+extern struct dataflow *df_add_problem (struct df *, struct df_problem *);
+extern enum df_changeable_flags df_set_flags (struct df *, enum df_changeable_flags);
+extern enum df_changeable_flags df_clear_flags (struct df *, enum df_changeable_flags);
 extern void df_set_blocks (struct df*, bitmap);
 extern void df_delete_basic_block (struct df *, int);
 extern void df_finish1 (struct df *);
@@ -680,28 +687,28 @@ extern bitmap df_get_live_out (struct df
 extern void df_grow_bb_info (struct dataflow *);
 extern void df_chain_dump (struct df_link *, FILE *);
 extern void df_print_bb_index (basic_block bb, FILE *file);
-extern struct dataflow *df_ru_add_problem (struct df *, int);
+extern struct dataflow *df_ru_add_problem (struct df *);
 extern struct df_ru_bb_info *df_ru_get_bb_info (struct dataflow *, unsigned int);
-extern struct dataflow *df_rd_add_problem (struct df *, int);
+extern struct dataflow *df_rd_add_problem (struct df *);
 extern struct df_rd_bb_info *df_rd_get_bb_info (struct dataflow *, unsigned int);
-extern struct dataflow *df_lr_add_problem (struct df *, int);
+extern struct dataflow *df_lr_add_problem (struct df *);
 extern struct df_lr_bb_info *df_lr_get_bb_info (struct dataflow *, unsigned int);
 extern void df_lr_simulate_artificial_refs_at_end (struct df *, basic_block, bitmap);
 extern void df_lr_simulate_one_insn (struct df *, basic_block, rtx, bitmap);
-extern struct dataflow *df_ur_add_problem (struct df *, int);
+extern struct dataflow *df_ur_add_problem (struct df *);
 extern struct df_ur_bb_info *df_ur_get_bb_info (struct dataflow *, unsigned int);
-extern struct dataflow *df_live_add_problem (struct df *, int);
+extern struct dataflow *df_live_add_problem (struct df *);
 extern struct df_live_bb_info *df_live_get_bb_info (struct dataflow *, unsigned int);
-extern struct dataflow *df_urec_add_problem (struct df *, int);
+extern struct dataflow *df_urec_add_problem (struct df *);
 extern struct df_urec_bb_info *df_urec_get_bb_info (struct dataflow *, unsigned int);
-extern struct dataflow *df_chain_add_problem (struct df *, int);
-extern struct dataflow *df_ri_add_problem (struct df *, int);
+extern struct dataflow *df_chain_add_problem (struct df *);
+extern struct dataflow *df_ri_add_problem (struct df *);
 extern bitmap df_ri_get_setjmp_crosses (struct df *);
 
 /* Functions defined in df-scan.c.  */
 
 extern struct df_scan_bb_info *df_scan_get_bb_info (struct dataflow *, unsigned int);
-extern struct dataflow *df_scan_add_problem (struct df *, int);
+extern struct dataflow *df_scan_add_problem (struct df *);
 extern void df_rescan_blocks (struct df *, bitmap);
 extern struct df_ref *df_ref_create (struct df *, rtx, rtx *, rtx,basic_block,enum df_ref_type, enum df_ref_flags);
 extern struct df_ref *df_get_artificial_defs (struct df *, unsigned int);
Index: gcc/df-problems.c
===================================================================
--- gcc/df-problems.c	(revision 117304)
+++ gcc/df-problems.c	(working copy)
@@ -840,8 +840,7 @@ static struct df_problem problem_RU =
   df_ru_start_dump,           /* Debugging.  */
   df_ru_top_dump,             /* Debugging start block.  */
   df_ru_bottom_dump,          /* Debugging end block.  */
-  NULL,                       /* Dependent problem.  */
-  0                           /* Changeable flags.  */
+  NULL                        /* Dependent problem.  */
 };
 
 
@@ -851,9 +850,9 @@ static struct df_problem problem_RU =
    solution.  */
 
 struct dataflow *
-df_ru_add_problem (struct df *df, int flags)
+df_ru_add_problem (struct df *df)
 {
-  return df_add_problem (df, &problem_RU, flags);
+  return df_add_problem (df, &problem_RU);
 }
 
 
@@ -1384,8 +1383,7 @@ static struct df_problem problem_RD =
   df_rd_start_dump,           /* Debugging.  */
   df_rd_top_dump,             /* Debugging start block.  */
   df_rd_bottom_dump,          /* Debugging end block.  */
-  NULL,                       /* Dependent problem.  */
-  0                           /* Changeable flags.  */
+  NULL                        /* Dependent problem.  */
 };
 
 
@@ -1395,9 +1393,9 @@ static struct df_problem problem_RD =
    solution.  */
 
 struct dataflow *
-df_rd_add_problem (struct df *df, int flags)
+df_rd_add_problem (struct df *df)
 {
-  return df_add_problem (df, &problem_RD, flags);
+  return df_add_problem (df, &problem_RD);
 }
 
 
@@ -1738,7 +1736,8 @@ df_lr_transfer_function (struct dataflow
 static void
 df_lr_local_finalize (struct dataflow *dflow, bitmap all_blocks ATTRIBUTE_UNUSED)
 {
-  if (dflow->flags & DF_LR_RUN_DCE)
+  struct df *df = dflow->df;
+  if (df->changeable_flags & DF_LR_RUN_DCE)
     run_fast_df_dce (dflow->df);
 }
 
@@ -1916,8 +1915,7 @@ static struct df_problem problem_LR =
   NULL,                       /* Debugging.  */
   df_lr_top_dump,             /* Debugging start block.  */
   df_lr_bottom_dump,          /* Debugging end block.  */
-  NULL,                       /* Dependent problem.  */
-  DF_LR_RUN_DCE               /* Can turn on or off dce running during df-analyze.  */
+  NULL                        /* Dependent problem.  */
 };
 
 
@@ -1926,9 +1924,9 @@ static struct df_problem problem_LR =
    solution.  */
 
 struct dataflow *
-df_lr_add_problem (struct df *df, int flags)
+df_lr_add_problem (struct df *df)
 {
-  return df_add_problem (df, &problem_LR, flags);
+  return df_add_problem (df, &problem_LR);
 }
 
 
@@ -2239,8 +2237,7 @@ static struct df_problem problem_UR =
   NULL,                       /* Debugging.  */
   df_ur_top_dump,             /* Debugging start block.  */
   df_ur_bottom_dump,          /* Debugging end block.  */
-  df_lr_add_problem,          /* Dependent problem.  */
-  0                           /* Changeable flags.  */
+  df_lr_add_problem           /* Dependent problem.  */
 };
 
 
@@ -2249,9 +2246,9 @@ static struct df_problem problem_UR =
    solution.  */
 
 struct dataflow *
-df_ur_add_problem (struct df *df, int flags)
+df_ur_add_problem (struct df *df)
 {
-  return df_add_problem (df, &problem_UR, flags);
+  return df_add_problem (df, &problem_UR);
 }
 
 
@@ -2434,8 +2431,7 @@ static struct df_problem problem_LIVE =
   NULL,                       /* Debugging.  */
   df_live_top_dump,           /* Debugging start block.  */
   df_live_bottom_dump,        /* Debugging end block.  */
-  df_ur_add_problem,          /* Dependent problem.  */
-  0                           /* Changeable flags.  */
+  df_ur_add_problem           /* Dependent problem.  */
 };
 
 
@@ -2444,9 +2440,9 @@ static struct df_problem problem_LIVE =
    solution.  */
 
 struct dataflow *
-df_live_add_problem (struct df *df, int flags)
+df_live_add_problem (struct df *df)
 {
-  return df_add_problem (df, &problem_LIVE, flags);
+  return df_add_problem (df, &problem_LIVE);
 }
 
 
@@ -3046,8 +3042,7 @@ static struct df_problem problem_UREC =
   NULL,                       /* Debugging.  */
   df_urec_top_dump,           /* Debugging start block.  */
   df_urec_bottom_dump,        /* Debugging end block.  */
-  df_lr_add_problem,          /* Dependent problem.  */
-  0                           /* Changeable flags.  */
+  df_lr_add_problem           /* Dependent problem.  */
 };
 
 
@@ -3056,9 +3051,9 @@ static struct df_problem problem_UREC =
    solution.  */
 
 struct dataflow *
-df_urec_add_problem (struct df *df, int flags)
+df_urec_add_problem (struct df *df)
 {
-  return df_add_problem (df, &problem_UREC, flags);
+  return df_add_problem (df, &problem_UREC);
 }
 
 
@@ -3092,7 +3087,7 @@ df_chain_alloc (struct dataflow *dflow, 
   dflow->block_pool = create_alloc_pool ("df_chain_chain_block pool", 
 					 sizeof (struct df_link), 100);
 
-  if (dflow->flags & DF_DU_CHAIN)
+  if (df->permanent_flags & DF_DU_CHAIN)
     {
       if (!df->def_info.refs_organized)
 	df_reorganize_refs (&df->def_info);
@@ -3105,7 +3100,7 @@ df_chain_alloc (struct dataflow *dflow, 
 	}
     }
   
-  if (dflow->flags & DF_UD_CHAIN)
+  if (df->permanent_flags & DF_UD_CHAIN)
     {
       if (!df->use_info.refs_organized)
 	df_reorganize_refs (&df->use_info);
@@ -3133,7 +3128,7 @@ df_chain_insn_reset (struct dataflow *df
 
   if (insn_info)
     {
-      if (dflow->flags & DF_DU_CHAIN)
+      if (df->permanent_flags & DF_DU_CHAIN)
 	{
 	  ref = insn_info->defs;
 	  while (ref)
@@ -3143,7 +3138,7 @@ df_chain_insn_reset (struct dataflow *df
 	    }
 	}
 
-      if (dflow->flags & DF_UD_CHAIN)
+      if (df->permanent_flags & DF_UD_CHAIN)
 	{
 	  ref = insn_info->uses;
 	  while (ref) 
@@ -3179,7 +3174,7 @@ df_chain_bb_reset (struct dataflow *dflo
     }
   
   /* Get rid of any chains in artificial uses or defs.  */
-  if (dflow->flags & DF_DU_CHAIN)
+  if (df->permanent_flags & DF_DU_CHAIN)
     {
       struct df_ref *def;
       def = df_get_artificial_defs (df, bb_index);
@@ -3190,7 +3185,7 @@ df_chain_bb_reset (struct dataflow *dflo
 	}
     }
 
-  if (dflow->flags & DF_UD_CHAIN)
+  if (df->permanent_flags & DF_UD_CHAIN)
     {
       struct df_ref *use;
       use = df_get_artificial_uses (df, bb_index);
@@ -3253,9 +3248,9 @@ df_chain_create_bb_process_use (struct d
 		    break;
 		  
 		  def = DF_DEFS_GET (df, def_index);
-		  if (dflow->flags & DF_DU_CHAIN)
+		  if (df->permanent_flags & DF_DU_CHAIN)
 		    df_chain_create (dflow, def, use);
-		  if (dflow->flags & DF_UD_CHAIN)
+		  if (df->permanent_flags & DF_UD_CHAIN)
 		    df_chain_create (dflow, use, def);
 		}
 	    }
@@ -3377,7 +3372,7 @@ df_chain_start_dump (struct dataflow *df
   struct df *df = dflow->df;
   unsigned int j;
 
-  if (dflow->flags & DF_DU_CHAIN)
+  if (df->permanent_flags & DF_DU_CHAIN)
     {
       fprintf (file, "Def-use chains:\n");
       for (j = 0; j < df->def_info.bitmap_size; j++)
@@ -3400,7 +3395,7 @@ df_chain_start_dump (struct dataflow *df
 	}
     }
 
-  if (dflow->flags & DF_UD_CHAIN)
+  if (df->permanent_flags & DF_UD_CHAIN)
     {
       fprintf (file, "Use-def chains:\n");
       for (j = 0; j < df->use_info.bitmap_size; j++)
@@ -3449,8 +3444,7 @@ static struct df_problem problem_CHAIN =
   df_chain_start_dump,        /* Debugging.  */
   NULL,                       /* Debugging start block.  */
   NULL,                       /* Debugging end block.  */
-  df_rd_add_problem,          /* Dependent problem.  */
-  0                           /* Changeable flags.  */
+  df_rd_add_problem           /* Dependent problem.  */
 };
 
 
@@ -3463,9 +3457,9 @@ VEC(reg_info_p,heap) *reg_n_info;
    solution.  */
 
 struct dataflow *
-df_chain_add_problem (struct df *df, int flags)
+df_chain_add_problem (struct df *df)
 {
-  return df_add_problem (df, &problem_CHAIN, flags);
+  return df_add_problem (df, &problem_CHAIN);
 }
 
 
@@ -3519,7 +3513,7 @@ df_ri_alloc (struct dataflow *dflow, 
       problem_data->setjmp_crosses = NULL;
     }
 
-  if (dflow->flags & DF_RI_SETJMP)
+  if (df->permanent_flags & DF_RI_SETJMP)
     {
       if (problem_data->setjmp_crosses)
 	bitmap_clear (problem_data->setjmp_crosses);
@@ -3527,7 +3521,7 @@ df_ri_alloc (struct dataflow *dflow, 
 	problem_data->setjmp_crosses = BITMAP_ALLOC (NULL);
     }
 
-  if (dflow->flags & DF_RI_LIFE)
+  if (df->permanent_flags & DF_RI_LIFE)
     {
       max_regno = max_reg_num ();
       allocate_reg_info (max_regno, FALSE, FALSE);
@@ -3866,7 +3860,7 @@ df_ri_bb_compute (struct dataflow *dflow
   bitmap_copy (live, df_get_live_out (df, bb));
   bitmap_clear (artificial_uses);
 
-  if (dflow->flags & DF_RI_LIFE)
+  if (df->permanent_flags & DF_RI_LIFE)
     {
       /* Process the regs live at the end of the block.  Mark them as
 	 not local to any one basic block.  */
@@ -3903,7 +3897,7 @@ df_ri_bb_compute (struct dataflow *dflow
       if (!INSN_P (insn))
 	continue;
 
-      if (dflow->flags & DF_RI_LIFE)
+      if (df->permanent_flags & DF_RI_LIFE)
 	{
 	  /* Increment the live_length for all of the registers that
 	     are are referenced in this block and live at this
@@ -3918,18 +3912,18 @@ df_ri_bb_compute (struct dataflow *dflow
 	}
 
       bitmap_clear (do_not_gen);
-      df_kill_notes (insn, dflow->flags);
+      df_kill_notes (insn, df->permanent_flags);
 
       /* Process the defs.  */
       if (CALL_P (insn))
 	{
-	  if (dflow->flags & (DF_RI_LIFE | DF_RI_SETJMP))
+	  if (df->permanent_flags & (DF_RI_LIFE | DF_RI_SETJMP))
 	    {
 	      bool can_throw = can_throw_internal (insn); 
 	      bool set_jump = (find_reg_note (insn, REG_SETJMP, NULL) != NULL);
 	      EXECUTE_IF_SET_IN_BITMAP (live, 0, regno, bi)
 		{
-		  if (dflow->flags & DF_RI_LIFE)
+		  if (df->permanent_flags & DF_RI_LIFE)
 		    {
 		      REG_N_CALLS_CROSSED (regno)++;
 		      if (can_throw)
@@ -3958,7 +3952,7 @@ df_ri_bb_compute (struct dataflow *dflow
 	      if ((mws->type == DF_REF_REG_DEF) 
 		  && !df_ignore_stack_reg (REGNO (mws->mw_reg)))
 		df_set_unused_notes_for_mw (insn, mws, live, do_not_gen, 
-					    artificial_uses, dflow->flags);
+					    artificial_uses, df->permanent_flags);
 	    }
 
 	  /* All of the defs except the return value are some sort of
@@ -3967,7 +3961,7 @@ df_ri_bb_compute (struct dataflow *dflow
 	    if (!(DF_REF_FLAGS (def) & (DF_REF_MUST_CLOBBER | DF_REF_MAY_CLOBBER)))
 	      df_create_unused_note (bb, insn, def, live, do_not_gen, 
 				     artificial_uses, local_live, 
-				     local_processed, dflow->flags, luid);
+				     local_processed, df->permanent_flags, luid);
 
 	}
       else
@@ -3977,13 +3971,13 @@ df_ri_bb_compute (struct dataflow *dflow
 	    {
 	      if (mws->type == DF_REF_REG_DEF)
 		df_set_unused_notes_for_mw (insn, mws, live, do_not_gen, 
-					    artificial_uses, dflow->flags);
+					    artificial_uses, df->permanent_flags);
 	    }
 
 	  for (def = DF_INSN_UID_DEFS (df, uid); def; def = def->next_ref)
 	    df_create_unused_note (bb, insn, def, live, do_not_gen, 
 				   artificial_uses, local_live, 
-				   local_processed, dflow->flags, luid);
+				   local_processed, df->permanent_flags, luid);
 	}
       
       /* Process the uses.  */
@@ -3992,14 +3986,14 @@ df_ri_bb_compute (struct dataflow *dflow
 	  if ((mws->type != DF_REF_REG_DEF)  
 	      && !df_ignore_stack_reg (REGNO (mws->mw_reg)))
 	    df_set_dead_notes_for_mw (insn, mws, live, do_not_gen,
-				      artificial_uses, dflow->flags);
+				      artificial_uses, df->permanent_flags);
 	}
 
       for (use = DF_INSN_UID_USES (df, uid); use; use = use->next_ref)
 	{
 	  unsigned int uregno = DF_REF_REGNO (use);
 
-	  if ((dflow->flags & DF_RI_LIFE) && (uregno >= FIRST_PSEUDO_REGISTER))
+	  if ((df->permanent_flags & DF_RI_LIFE) && (uregno >= FIRST_PSEUDO_REGISTER))
 	    {
 	      REG_FREQ (uregno) += REG_FREQ_FROM_BB (bb);
 	      if (REG_BASIC_BLOCK (uregno) == REG_BLOCK_UNKNOWN)
@@ -4027,7 +4021,7 @@ df_ri_bb_compute (struct dataflow *dflow
 		    SUBREG_REG (*DF_REF_LOC (use)) : *DF_REF_LOC (use);
 		  rtx note = alloc_EXPR_LIST (REG_DEAD, reg, REG_NOTES (insn));
 		  REG_NOTES (insn) = note;
-		  if (dflow->flags & DF_RI_LIFE)
+		  if (df->permanent_flags & DF_RI_LIFE)
 		    REG_N_DEATHS (uregno)++;
 
 #ifdef REG_DEAD_DEBUGGING
@@ -4037,7 +4031,7 @@ df_ri_bb_compute (struct dataflow *dflow
 	      /* This register is now live.  */
 	      bitmap_set_bit (live, uregno);
 
-	      if (dflow->flags & DF_RI_LIFE)
+	      if (df->permanent_flags & DF_RI_LIFE)
 		{
 		  /* If we have seen this regno, then it has already
 		     been processed correctly with the per insn
@@ -4055,7 +4049,7 @@ df_ri_bb_compute (struct dataflow *dflow
 	}
     }
   
-  if (dflow->flags & DF_RI_LIFE)
+  if (df->permanent_flags & DF_RI_LIFE)
     {
       /* Add the length of the block to all of the registers that were
 	 not referenced, but still live in this block.  */
@@ -4077,6 +4071,7 @@ static void
 df_ri_compute (struct dataflow *dflow, bitmap all_blocks ATTRIBUTE_UNUSED, 
 	       bitmap blocks_to_scan)
 {
+  struct df *df = dflow->df;
   unsigned int bb_index;
   bitmap_iterator bi;
   bitmap live = BITMAP_ALLOC (NULL);
@@ -4088,16 +4083,16 @@ df_ri_compute (struct dataflow *dflow, b
   struct df_ri_problem_data *problem_data =
     (struct df_ri_problem_data *) dflow->problem_data;
 
-  if (dflow->flags & DF_RI_LIFE)
+  if (df->permanent_flags & DF_RI_LIFE)
     {
       local_live = BITMAP_ALLOC (NULL);
       local_processed = BITMAP_ALLOC (NULL);
-      if (dflow->flags & DF_RI_SETJMP)
+      if (df->permanent_flags & DF_RI_SETJMP)
 	setjmp_crosses = problem_data->setjmp_crosses;
       else
 	setjmp_crosses = BITMAP_ALLOC (NULL);
     }
-  else if (dflow->flags & DF_RI_SETJMP)
+  else if (df->permanent_flags & DF_RI_SETJMP)
     setjmp_crosses = problem_data->setjmp_crosses;
 
 
@@ -4115,7 +4110,7 @@ df_ri_compute (struct dataflow *dflow, b
   BITMAP_FREE (live);
   BITMAP_FREE (do_not_gen);
   BITMAP_FREE (artificial_uses);
-  if (dflow->flags & DF_RI_LIFE)
+  if (df->permanent_flags & DF_RI_LIFE)
     {
       bitmap_iterator bi;
       unsigned int regno;
@@ -4129,7 +4124,7 @@ df_ri_compute (struct dataflow *dflow, b
 
       BITMAP_FREE (local_live);
       BITMAP_FREE (local_processed);
-      if (!dflow->flags & DF_RI_SETJMP)
+      if (!df->permanent_flags & DF_RI_SETJMP)
 	BITMAP_FREE (setjmp_crosses);
     }
 }
@@ -4140,10 +4135,11 @@ df_ri_compute (struct dataflow *dflow, b
 static void
 df_ri_free (struct dataflow *dflow)
 {
+  struct df *df = dflow->df;
   struct df_ri_problem_data *problem_data =
     (struct df_ri_problem_data *) dflow->problem_data;
 
-  if (dflow->flags & DF_RI_SETJMP)
+  if (df->permanent_flags & DF_RI_SETJMP)
     BITMAP_FREE (problem_data->setjmp_crosses);
 
   free (dflow->problem_data);
@@ -4156,7 +4152,8 @@ df_ri_free (struct dataflow *dflow)
 static void
 df_ri_start_dump (struct dataflow *dflow, FILE *file)
 {
-  if (dflow->flags & DF_RI_LIFE)
+  struct df *df = dflow->df;
+  if (df->permanent_flags & DF_RI_LIFE)
     {
       fprintf (file, "Register info:\n");
       dump_reg_info (file);
@@ -4187,8 +4184,7 @@ static struct df_problem problem_RI =
   /* Technically this is only dependent on the live registers problem
      but it will produce information if built one of uninitialized
      register problems (UR, UREC) is also run.  */
-  df_lr_add_problem,          /* Dependent problem.  */
-  0                           /* Changeable flags.  */
+  df_lr_add_problem           /* Dependent problem.  */
 };
 
 
@@ -4197,9 +4193,9 @@ static struct df_problem problem_RI =
    solution.  */
 
 struct dataflow * 
-df_ri_add_problem (struct df *df, int flags)
+df_ri_add_problem (struct df *df)
 {
-  return df_add_problem (df, &problem_RI, flags);
+  return df_add_problem (df, &problem_RI);
 }
 
 bitmap
Index: gcc/dce.c
===================================================================
--- gcc/dce.c	(revision 117304)
+++ gcc/dce.c	(working copy)
@@ -191,14 +191,14 @@ init_dce (bool fast)
     {
       if (fast)
 	{
-	  dce_df = df_init (DF_HARD_REGS);
-	  df_lr_add_problem (dce_df, 0);
+	  dce_df = df_init (DF_HARD_REGS, 0);
+	  df_lr_add_problem (dce_df);
 	  df_analyze (dce_df);
 	}
       else
 	{
-	  dce_df = df_init (DF_HARD_REGS);
-	  df_chain_add_problem (dce_df, DF_UD_CHAIN);
+	  dce_df = df_init (DF_HARD_REGS + DF_UD_CHAIN, 0);
+	  df_chain_add_problem (dce_df);
 	  df_analyze (dce_df);
 	}
     }
@@ -620,7 +620,7 @@ fast_dce (bool df_delete)
 	{
 	  /* Turn off the RUN_DCE flag to prevent recursive calls to
 	     dce.  */
-	  int old_flag = df_clear_flags (dflow, DF_LR_RUN_DCE);
+	  int old_flag = df_clear_flags (dce_df, DF_LR_RUN_DCE);
 
 	  /* So something was deleted that requires a redo.  Do it on
 	     the cheap.  */
@@ -637,7 +637,7 @@ fast_dce (bool df_delete)
 			      changed, postorder, n_blocks, false);
 
 	  if (old_flag & DF_LR_RUN_DCE)
-	    df_set_flags (dflow, DF_LR_RUN_DCE);
+	    df_set_flags (dce_df, DF_LR_RUN_DCE);
 	  bitmap_clear (changed);
 	  prescan_insns_for_dce (true);
 	}
Index: gcc/reg-stack.c
===================================================================
--- gcc/reg-stack.c	(revision 117304)
+++ gcc/reg-stack.c	(working copy)
@@ -3103,9 +3103,9 @@ reg_to_stack (void)
   if (i > LAST_STACK_REG)
     return false;
 
-  df = df_init (DF_HARD_REGS);
-  df_live_add_problem (df, 0);
-  df_ri_add_problem (df, 0);
+  df = df_init (DF_HARD_REGS, 0);
+  df_live_add_problem (df);
+  df_ri_add_problem (df);
   df_analyze (df);
 
   mark_dfs_back_edges ();
Index: gcc/sched-rgn.c
===================================================================
--- gcc/sched-rgn.c	(revision 117304)
+++ gcc/sched-rgn.c	(working copy)
@@ -2911,10 +2911,11 @@ schedule_insns (void)
      invoked via sched_init.  */
   current_sched_info = &region_sched_info;
 
-  df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES |	DF_SUBREGS);
-  df_lr_add_problem (df, DF_LR_RUN_DCE);
-  df_live_add_problem (df, 0);
-  df_ri_add_problem (df, DF_RI_LIFE);
+  df = df_init (DF_HARD_REGS + DF_EQUIV_NOTES + DF_SUBREGS + DF_RI_LIFE, 
+		DF_LR_RUN_DCE);
+  df_lr_add_problem (df);
+  df_live_add_problem (df);
+  df_ri_add_problem (df);
   df_analyze (df);
   sched_init (df);
 
Index: gcc/regrename.c
===================================================================
--- gcc/regrename.c	(revision 117304)
+++ gcc/regrename.c	(working copy)
@@ -193,10 +193,10 @@ regrename_optimize (void)
   int this_tick = 0;
   basic_block bb;
   char *first_obj;
-  struct df * df = df_init (DF_HARD_REGS);
-  df_lr_add_problem (df, DF_LR_RUN_DCE);
-  df_live_add_problem (df, 0);
-  df_ri_add_problem (df, 0);
+  struct df * df = df_init (DF_HARD_REGS, DF_LR_RUN_DCE);
+  df_lr_add_problem (df);
+  df_live_add_problem (df);
+  df_ri_add_problem (df);
   df_analyze (df);
 
   memset (tick, 0, sizeof tick);
Index: gcc/sched-ebb.c
===================================================================
--- gcc/sched-ebb.c	(revision 117304)
+++ gcc/sched-ebb.c	(working copy)
@@ -560,10 +560,11 @@ schedule_ebbs (void)
      invoked via sched_init.  */
   current_sched_info = &ebb_sched_info;
 
-  df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES |	DF_SUBREGS);
-  df_lr_add_problem (df, DF_LR_RUN_DCE);
-  df_live_add_problem (df, 0);
-  df_ri_add_problem (df, DF_RI_LIFE);
+  df = df_init (DF_HARD_REGS + DF_EQUIV_NOTES + DF_SUBREGS + DF_RI_LIFE, 
+		DF_LR_RUN_DCE);
+  df_lr_add_problem (df);
+  df_live_add_problem (df);
+  df_ri_add_problem (df);
   df_analyze (df);
   sched_init (df);
 
Index: gcc/fwprop.c
===================================================================
--- gcc/fwprop.c	(revision 117304)
+++ gcc/fwprop.c	(working copy)
@@ -903,8 +903,8 @@ fwprop_init (void)
 
   /* Now set up the dataflow problem (we only want use-def chains) and
      put the dataflow solver to work.  */
-  df = df_init (DF_SUBREGS | DF_EQUIV_NOTES);
-  df_chain_add_problem (df, DF_UD_CHAIN);
+  df = df_init (DF_SUBREGS + DF_EQUIV_NOTES + DF_UD_CHAIN, 0);
+  df_chain_add_problem (df);
   df_analyze (df);
 }
 
Index: gcc/see.c
===================================================================
--- gcc/see.c	(revision 117304)
+++ gcc/see.c	(working copy)
@@ -1331,9 +1331,9 @@ static void
 see_initialize_data_structures (void)
 {
   /* Build the df object. */
-  df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES | DF_SUBREGS);
-  df_rd_add_problem (df, 0);
-  df_chain_add_problem (df, DF_DU_CHAIN | DF_UD_CHAIN);
+  df = df_init (DF_HARD_REGS + DF_EQUIV_NOTES + DF_SUBREGS + DF_DU_CHAIN + DF_UD_CHAIN, 0);
+  df_rd_add_problem (df);
+  df_chain_add_problem (df);
   df_analyze (df);
 
   if (dump_file)
Index: gcc/auto-inc-dec.c
===================================================================
--- gcc/auto-inc-dec.c	(revision 117304)
+++ gcc/auto-inc-dec.c	(working copy)
@@ -1457,9 +1457,9 @@ rest_of_handle_auto_inc_dec (void)
 
   mem_tmp = gen_rtx_MEM (Pmode, NULL_RTX);
 
-  df = df_init (DF_HARD_REGS);
-  df_live_add_problem (df, 0);
-  df_ri_add_problem (df, 0);
+  df = df_init (DF_HARD_REGS, 0);
+  df_live_add_problem (df);
+  df_ri_add_problem (df);
   scan_dflow = df->problems_by_index[DF_SCAN];
   df_analyze (df);
 
Index: gcc/mode-switching.c
===================================================================
--- gcc/mode-switching.c	(revision 117304)
+++ gcc/mode-switching.c	(working copy)
@@ -421,9 +421,9 @@ optimize_mode_switching (void)
   if (! n_entities)
     return 0;
 
-  df = df_init (DF_HARD_REGS);
-  df_live_add_problem (df, 0);
-  df_ri_add_problem (df, 0);
+  df = df_init (DF_HARD_REGS, 0);
+  df_live_add_problem (df);
+  df_ri_add_problem (df);
   df_analyze (df);
 
 #if defined (MODE_ENTRY) && defined (MODE_EXIT)
Index: gcc/modulo-sched.c
===================================================================
--- gcc/modulo-sched.c	(revision 117304)
+++ gcc/modulo-sched.c	(working copy)
@@ -932,12 +932,14 @@ sms_schedule (void)
   current_sched_info = &sms_sched_info;
 
   /* Init Data Flow analysis, to be used in interloop dep calculation.  */
-  df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES |	DF_SUBREGS);
-  df_lr_add_problem (df, DF_LR_RUN_DCE);
-  df_rd_add_problem (df, 0);
-  df_ru_add_problem (df, 0);
-  df_ri_add_problem (df, DF_RI_LIFE);
-  df_chain_add_problem (df, DF_DU_CHAIN | DF_UD_CHAIN);
+  df = df_init (DF_HARD_REGS + DF_EQUIV_NOTES + DF_SUBREGS + 
+		DF_RI_LIFE + DF_DU_CHAIN + DF_UD_CHAIN, 
+		DF_LR_RUN_DCE);
+  df_lr_add_problem (df);
+  df_rd_add_problem (df);
+  df_ru_add_problem (df);
+  df_ri_add_problem (df);
+  df_chain_add_problem (df);
   df_analyze (df);
   sched_init (df);
 
Index: gcc/web.c
===================================================================
--- gcc/web.c	(revision 117304)
+++ gcc/web.c	(working copy)
@@ -253,8 +253,8 @@ web_main (void)
   int max = max_reg_num ();
   char *used;
 
-  df = df_init (DF_EQUIV_NOTES);
-  df_chain_add_problem (df, DF_UD_CHAIN);
+  df = df_init (DF_EQUIV_NOTES + DF_UD_CHAIN, 0);
+  df_chain_add_problem (df);
   df_analyze (df);
   df_reorganize_refs (&df->def_info);
   df_reorganize_refs (&df->use_info);
Index: gcc/ifcvt.c
===================================================================
--- gcc/ifcvt.c	(revision 117304)
+++ gcc/ifcvt.c	(working copy)
@@ -3852,9 +3852,9 @@ if_convert (void)
   basic_block bb;
   int pass;
   bitmap modified = BITMAP_ALLOC (NULL);
-  struct df * df = df_init (DF_HARD_REGS);
-  struct dataflow *lr_dflow = df_lr_add_problem (df, DF_LR_RUN_DCE);
-  df_live_add_problem (df, 0);
+  struct df * df = df_init (DF_HARD_REGS, DF_LR_RUN_DCE);
+  df_lr_add_problem (df);
+  df_live_add_problem (df);
 
   num_possible_if_blocks = 0;
   num_updated_if_blocks = 0;
@@ -3883,7 +3883,7 @@ if_convert (void)
     {
       df_analyze (df);
       /* Only need to do dce on the first pass.  */
-      df_clear_flags (lr_dflow, DF_LR_RUN_DCE);
+      df_clear_flags (df, DF_LR_RUN_DCE);
       cond_exec_changed_p = FALSE;
       pass++;
 
Index: gcc/recog.c
===================================================================
--- gcc/recog.c	(revision 117304)
+++ gcc/recog.c	(working copy)
@@ -2881,12 +2881,12 @@ peephole2_optimize (void)
   basic_block bb;
   bool do_cleanup_cfg = false;
   bool do_rebuild_jump_labels = false;
-  struct df * df = df_init (DF_HARD_REGS);
+  struct df * df = df_init (DF_HARD_REGS, DF_LR_RUN_DCE);
   struct dataflow *dflow = df->problems_by_index [DF_SCAN];
 
-  df_lr_add_problem (df, DF_LR_RUN_DCE);
-  df_live_add_problem (df, 0);
-  df_ru_add_problem (df, 0);
+  df_lr_add_problem (df);
+  df_live_add_problem (df);
+  df_ru_add_problem (df);
   df_analyze (df);
 
   /* Initialize the regsets we're going to use.  */
Index: gcc/regmove.c
===================================================================
--- gcc/regmove.c	(revision 117304)
+++ gcc/regmove.c	(working copy)
@@ -1125,9 +1125,9 @@ regmove_optimize (rtx f, int nregs)
   int i;
   rtx copy_src, copy_dst;
   basic_block bb;
-  struct df * df = df_init (DF_HARD_REGS);
-  df_live_add_problem (df, 0);
-  df_ri_add_problem (df, DF_RI_LIFE);
+  struct df * df = df_init (DF_HARD_REGS + DF_RI_LIFE, 0);
+  df_live_add_problem (df);
+  df_ri_add_problem (df);
   df_analyze (df);
 
   /* ??? Hack.  Regmove doesn't examine the CFG, and gets mightily
@@ -2603,9 +2603,9 @@ rest_of_handle_stack_adjustments (void)
   if (!ACCUMULATE_OUTGOING_ARGS)
 #endif
     {
-      struct df * df = df_init (DF_HARD_REGS);
-      df_live_add_problem (df, 0);
-      df_ri_add_problem (df, 0);
+      struct df * df = df_init (DF_HARD_REGS, 0);
+      df_live_add_problem (df);
+      df_ri_add_problem (df);
       df_analyze (df);
       combine_stack_adjustments ();
     }
Index: gcc/local-alloc.c
===================================================================
--- gcc/local-alloc.c	(revision 117304)
+++ gcc/local-alloc.c	(working copy)
@@ -2489,10 +2489,10 @@ rest_of_handle_local_alloc (void)
   int rebuild_notes;
 
   /* Create a new version of df that has the special version of UR.  */
-  ra_df = df_init (DF_HARD_REGS);
-  df_lr_add_problem (ra_df, 0);
-  df_urec_add_problem (ra_df, 0);
-  df_ri_add_problem (ra_df, DF_RI_LIFE | DF_RI_SETJMP);
+  ra_df = df_init (DF_HARD_REGS + DF_RI_LIFE + DF_RI_SETJMP, 0);
+  df_lr_add_problem (ra_df);
+  df_urec_add_problem (ra_df);
+  df_ri_add_problem (ra_df);
   df_analyze (ra_df);
 
   /* If we are not optimizing, then this is the only place before
Index: gcc/function.c
===================================================================
--- gcc/function.c	(revision 117304)
+++ gcc/function.c	(working copy)
@@ -5093,7 +5093,7 @@ thread_prologue_and_epilogue_insns (void
 #endif
   edge_iterator ei;
 
-  prologue_epilogue_df = df_init (DF_HARD_REGS);
+  prologue_epilogue_df = df_init (DF_HARD_REGS, 0);
   /* Do not even think about running dce here!!!!  All life, as we
      know it will cease!!!  There is dead code created by the previous
      call to split_all_insns that is resurrected by the prologue and
@@ -5104,7 +5104,7 @@ thread_prologue_and_epilogue_insns (void
      designed for modular testing.  All of the test cases that fail
      because of running dce here fail in the g++ library, not in the
      test case.  */
-  df_lr_add_problem (prologue_epilogue_df, 0);
+  df_lr_add_problem (prologue_epilogue_df);
   df_analyze (prologue_epilogue_df);
 
 #ifdef HAVE_prologue
Index: gcc/rtl-factoring.c
===================================================================
--- gcc/rtl-factoring.c	(revision 117304)
+++ gcc/rtl-factoring.c	(working copy)
@@ -1360,9 +1360,9 @@ static void
 rtl_seqabstr (void)
 {
   int iter;
-  struct df * df = df_init (DF_HARD_REGS);
-  df_lr_add_problem (df, DF_LR_RUN_DCE);
-  df_live_add_problem (df, 0);
+  struct df * df = df_init (DF_HARD_REGS, DF_LR_RUN_DCE);
+  df_lr_add_problem (df);
+  df_live_add_problem (df);
   df_analyze (df);
 
   /* Create a hash list for COLLECT_PATTERN_SEQS.  */
Index: gcc/bt-load.c
===================================================================
--- gcc/bt-load.c	(revision 117304)
+++ gcc/bt-load.c	(working copy)
@@ -1467,8 +1467,8 @@ branch_target_load_optimize (bool after_
   enum reg_class class = targetm.branch_target_register_class ();
   if (class != NO_REGS)
     {
-      struct df * df = df_init (DF_HARD_REGS);
-      df_live_add_problem (df, 0);
+      struct df * df = df_init (DF_HARD_REGS, 0);
+      df_live_add_problem (df);
 
       /* Initialize issue_rate.  */
       if (targetm.sched.issue_rate)
Index: gcc/loop-invariant.c
===================================================================
--- gcc/loop-invariant.c	(revision 117304)
+++ gcc/loop-invariant.c	(working copy)
@@ -1319,8 +1319,8 @@ move_loop_invariants (struct loops *loop
 {
   struct loop *loop;
   unsigned i;
-  df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES);
-  df_chain_add_problem (df, DF_UD_CHAIN);
+  df = df_init (DF_HARD_REGS + DF_EQUIV_NOTES + DF_UD_CHAIN, 0);
+  df_chain_add_problem (df);
  
   /* Process the loops, innermost first.  */
   loop = loops->tree_root;
Index: gcc/subregs-init.c
===================================================================
--- gcc/subregs-init.c	(revision 117304)
+++ gcc/subregs-init.c	(working copy)
@@ -106,9 +106,9 @@ initialize_uninitialized_subregs (void)
   bool did_something = false;
   find_regno_partial_param param;
   edge_iterator ei;
-  struct df *df = df_init (DF_HARD_REGS);
+  struct df *df = df_init (DF_HARD_REGS, 0);
 
-  df_live_add_problem (df, 0);
+  df_live_add_problem (df);
   df_analyze (df);
 
   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
Index: gcc/loop-iv.c
===================================================================
--- gcc/loop-iv.c	(revision 117304)
+++ gcc/loop-iv.c	(working copy)
@@ -252,8 +252,8 @@ iv_analysis_loop_init (struct loop *loop
   /* Clear the information from the analysis of the previous loop.  */
   if (first_time)
     {
-      df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES);
-      df_chain_add_problem (df, DF_UD_CHAIN);
+      df = df_init (DF_HARD_REGS + DF_EQUIV_NOTES + DF_UD_CHAIN, 0);
+      df_chain_add_problem (df);
       bivs = htab_create (10, biv_hash, biv_eq, free);
     }
   else
Index: gcc/combine.c
===================================================================
--- gcc/combine.c	(revision 117304)
+++ gcc/combine.c	(working copy)
@@ -12915,10 +12915,10 @@ rest_of_handle_combine (void)
 {
   int rebuild_jump_labels_after_combine;
 
-  df = df_init (DF_HARD_REGS);
-  df_lr_add_problem (df, DF_LR_RUN_DCE);
-  df_live_add_problem (df, 0);
-  df_ri_add_problem (df, DF_RI_LIFE);
+  df = df_init (DF_HARD_REGS + DF_RI_LIFE, DF_LR_RUN_DCE);
+  df_lr_add_problem (df);
+  df_live_add_problem (df);
+  df_ri_add_problem (df);
   df_analyze (df);
 
   create_log_links ();

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