+/* Function prototypes added to df_problem instance. */
+
+/* Allocate the problem specific data. */
+typedef void (*df_alloc_function) (struct dataflow *, bitmap, bitmap);
+
+/* This function is called if the problem has global data that needs
+ to be cleared when ever the set of blocks changes. The bitmap
+ contains the set of blocks that may require special attention.
+ This call is only made if some of the blocks are going to change.
+ If everything is to be deleted, the wholesale deletion mechanisms
+ apply. */
+typedef void (*df_reset_function) (struct dataflow *, bitmap);
+
+/* Free the basic block info. Called from the block reordering code
+ to get rid of the blocks that have been squished down. */
+typedef void (*df_free_bb_function) (struct dataflow *, basic_block, void *);
+
+/* Local compute function. */
+typedef void (*df_local_compute_function) (struct dataflow *, bitmap, bitmap);
+
+/* Init the solution specific data. */
+typedef void (*df_init_function) (struct dataflow *, bitmap);
+
+/* Iterative dataflow function. */
+typedef void (*df_dataflow_function) (struct dataflow *, bitmap, bitmap,
+ int *, int, bool);
+
+/* Confluence operator for blocks with 0 out (or in) edges. */
+typedef void (*df_confluence_function_0) (struct dataflow *, basic_block);
+
+/* Confluence operator for blocks with 1 or more out (or in) edges. */
+typedef void (*df_confluence_function_n) (struct dataflow *, edge);
+
+/* Transfer function for blocks. */
+typedef bool (*df_transfer_function) (struct dataflow *, int);
+
+/* Function to massage the information after the problem solving. */
+typedef void (*df_finalizer_function) (struct dataflow*, bitmap);
+
+/* Function to free all of the problem specific datastructures. */
+typedef void (*df_free_function) (struct dataflow *);
+
+/* Function to dump results to FILE. */
+typedef void (*df_dump_problem_function) (struct dataflow *, FILE *);
+
+/* 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);
+
+/* The static description of a dataflow problem to solve. See above
+ typedefs for doc for the function fields. */
+
+struct df_problem {
+ /* The unique id of the problem. This is used it index into
+ df->defined_problems to make accessing the problem data easy. */
+ unsigned int id;
+ enum df_flow_dir dir; /* Dataflow direction. */
+ df_alloc_function alloc_fun;
+ df_reset_function reset_fun;
+ df_free_bb_function free_bb_fun;
+ df_local_compute_function local_compute_fun;
+ df_init_function init_fun;
+ df_dataflow_function dataflow_fun;
+ df_confluence_function_0 con_fun_0;
+ df_confluence_function_n con_fun_n;
+ df_transfer_function trans_fun;
+ df_finalizer_function finalize_fun;
+ df_free_function free_fun;
+ df_dump_problem_function dump_fun;
+ df_dependent_problem_function dependent_problem_fun;
+
+ /* Flags can be changed after analysis starts. */
+ int changeable_flags;
+};
+
+
+/* The specific instance of the problem to solve. */
+struct dataflow