summaryrefslogtreecommitdiff
path: root/gcc/df.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/df.h')
-rw-r--r--gcc/df.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/gcc/df.h b/gcc/df.h
index 34de926bcb..681ff32098 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -1,6 +1,6 @@
/* Form lists of pseudo register references for autoinc optimization
for GNU compiler. This is part of flow optimization.
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2017 Free Software Foundation, Inc.
Originally contributed by Michael P. Hayes
(m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
Major rewrite contributed by Danny Berlin (dberlin@dberlin.org)
@@ -43,17 +43,20 @@ union df_ref_d;
a uniform manner. The last four problems can be added or deleted
at any time are always defined (though LIVE is always there at -O2
or higher); the others are always there. */
-#define DF_SCAN 0
-#define DF_LR 1 /* Live Registers backward. */
-#define DF_LIVE 2 /* Live Registers & Uninitialized Registers */
-#define DF_RD 3 /* Reaching Defs. */
-#define DF_CHAIN 4 /* Def-Use and/or Use-Def Chains. */
-#define DF_WORD_LR 5 /* Subreg tracking lr. */
-#define DF_NOTE 6 /* REG_DEAD and REG_UNUSED notes. */
-#define DF_MD 7 /* Multiple Definitions. */
-#define DF_MIR 8 /* Must-initialized Registers. */
-
-#define DF_LAST_PROBLEM_PLUS1 (DF_MIR + 1)
+enum df_problem_id
+ {
+ DF_SCAN,
+ DF_LR, /* Live Registers backward. */
+ DF_LIVE, /* Live Registers & Uninitialized Registers */
+ DF_RD, /* Reaching Defs. */
+ DF_CHAIN, /* Def-Use and/or Use-Def Chains. */
+ DF_WORD_LR, /* Subreg tracking lr. */
+ DF_NOTE, /* REG_DEAD and REG_UNUSED notes. */
+ DF_MD, /* Multiple Definitions. */
+ DF_MIR, /* Must-initialized Registers. */
+
+ DF_LAST_PROBLEM_PLUS1
+ };
/* Dataflow direction. */
enum df_flow_dir
@@ -251,7 +254,7 @@ typedef void (*df_verify_solution_end) (void);
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_problem_id id;
enum df_flow_dir dir; /* Dataflow direction. */
df_alloc_function alloc_fun;
df_reset_function reset_fun;
@@ -272,7 +275,7 @@ struct df_problem {
df_dump_insn_problem_function dump_insn_bottom_fun;
df_verify_solution_start verify_start_fun;
df_verify_solution_end verify_end_fun;
- struct df_problem *dependent_problem;
+ const struct df_problem *dependent_problem;
unsigned int block_info_elt_size;
/* The timevar id associated with this pass. */
@@ -287,7 +290,7 @@ struct df_problem {
/* The specific instance of the problem to solve. */
struct dataflow
{
- struct df_problem *problem; /* The problem to be solved. */
+ const struct df_problem *problem; /* The problem to be solved. */
/* Array indexed by bb->index, that contains basic block problem and
solution specific information. */
@@ -447,6 +450,13 @@ enum df_chain_flags
DF_UD_CHAIN = 2 /* Build UD chains. */
};
+enum df_scan_flags
+{
+ /* Flags for the SCAN problem. */
+ DF_SCAN_EMPTY_ENTRY_EXIT = 1 /* Don't define any registers in the entry
+ block; don't use any in the exit block. */
+};
+
enum df_changeable_flags
{
/* Scanning flags. */
@@ -945,7 +955,7 @@ extern struct df_d *df;
/* Functions defined in df-core.c. */
-extern void df_add_problem (struct df_problem *);
+extern void df_add_problem (const struct df_problem *);
extern int df_set_flags (int);
extern int df_clear_flags (int);
extern void df_set_blocks (bitmap);