aboutsummaryrefslogtreecommitdiff
path: root/gcc/df.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/df.h')
-rw-r--r--gcc/df.h49
1 files changed, 34 insertions, 15 deletions
diff --git a/gcc/df.h b/gcc/df.h
index 14aea52a766..3e215177903 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -84,6 +84,7 @@ struct ref
unsigned int id; /* Ref index. */
enum df_ref_type type; /* Type of ref. */
enum df_ref_flags flags; /* Various flags. */
+ void *data; /* The data assigned to it by user. */
};
@@ -196,6 +197,7 @@ struct df_map
#define DF_REF_CHAIN(REF) ((REF)->chain)
#define DF_REF_ID(REF) ((REF)->id)
#define DF_REF_FLAGS(REF) ((REF)->flags)
+#define DF_REF_DATA(REF) ((REF)->data)
/* Macros to determine the reference type. */
@@ -234,6 +236,7 @@ struct df_map
extern struct df *df_init (void);
extern int df_analyze (struct df *, bitmap, int);
+extern void df_analyze_subcfg (struct df *, bitmap, int);
extern void df_finish (struct df *);
@@ -292,6 +295,7 @@ extern int df_bb_regs_lives_compare (struct df *, basic_block, rtx, rtx);
extern rtx df_bb_single_def_use_insn_find (struct df *, basic_block, rtx,
rtx);
+extern struct ref *df_find_def (struct df *, rtx, rtx);
/* Functions for debugging from GDB. */
@@ -330,22 +334,37 @@ enum df_flow_dir
};
-typedef void (*transfer_function_sbitmap) (int, int *, sbitmap, sbitmap,
- sbitmap, sbitmap, void *);
+typedef void (*transfer_function) (int, int *, void *, void *,
+ void *, void *, void *);
-typedef void (*transfer_function_bitmap) (int, int *, bitmap, bitmap,
- bitmap, bitmap, void *);
+/* The description of a dataflow problem to solve. */
-extern void iterative_dataflow_sbitmap (sbitmap *, sbitmap *, sbitmap *,
- sbitmap *, bitmap, enum df_flow_dir,
- enum df_confluence_op,
- transfer_function_sbitmap,
- int *, void *);
+enum set_representation
+{
+ SR_SBITMAP, /* Represent sets by bitmaps. */
+ SR_BITMAP /* Represent sets by sbitmaps. */
+};
+
+struct dataflow
+{
+ enum set_representation repr; /* The way the sets are represented. */
+
+ /* The following arrays are indexed by block indices, so they must always
+ be large enough even if we restrict ourselves just to a subset of cfg. */
+ void **gen, **kill; /* Gen and kill sets. */
+ void **in, **out; /* Results. */
+
+ enum df_flow_dir dir; /* Dataflow direction. */
+ enum df_confluence_op conf_op; /* Confluence operator. */
+ unsigned n_blocks; /* Number of basic blocks in the
+ order. */
+ int *order; /* The list of basic blocks to work
+ with, in the order they should
+ be processed in. */
+ transfer_function transfun; /* The transfer function. */
+ void *data; /* Data used by the transfer
+ function. */
+};
-extern void iterative_dataflow_bitmap (bitmap *, bitmap *, bitmap *,
- bitmap *, bitmap,
- enum df_flow_dir,
- enum df_confluence_op,
- transfer_function_bitmap,
- int *, void *);
+extern void iterative_dataflow (struct dataflow *);
extern bool read_modify_subreg_p (rtx);