diff options
author | David Malcolm <dmalcolm@redhat.com> | 2016-04-27 18:08:46 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2016-04-27 18:08:46 +0000 |
commit | b55b11bb7a9aceb8c7ffda6c194347ec6c1556e5 (patch) | |
tree | f07de371e1071a2f12c015b45436916f4f768eef /gcc | |
parent | 1e55d29a0c643ebef76b6056077e9f78686669d6 (diff) | |
download | gcc-b55b11bb7a9aceb8c7ffda6c194347ec6c1556e5.zip gcc-b55b11bb7a9aceb8c7ffda6c194347ec6c1556e5.tar.gz gcc-b55b11bb7a9aceb8c7ffda6c194347ec6c1556e5.tar.bz2 |
Convert DF_SCAN etc from #define to an enum
Whilst debugging an issue in df, I noticed that there are
some #define constants that could be an enum (thus making them known
to gdb).
Convert them to a new enum, and update the "id" field of
struct df_problem.
gcc/ChangeLog:
* df.h (DF_SCAN, DF_LR, DF_LIVE, DF_RD, DF_CHAIN, DF_WORD_LR,
DF_NOTE, DF_MD, DF_MIR, DF_LAST_PROBLEM_PLUS1): Convert from
#define to...
(enum df_problem_id): ...this new enum.
(struct df_problem): Convert field "id" from "int" to
enum df_problem_id.
From-SVN: r235522
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/df.h | 27 |
2 files changed, 24 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7ea42e8..6302382 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2016-04-27 David Malcolm <dmalcolm@redhat.com> + * df.h (DF_SCAN, DF_LR, DF_LIVE, DF_RD, DF_CHAIN, DF_WORD_LR, + DF_NOTE, DF_MD, DF_MIR, DF_LAST_PROBLEM_PLUS1): Convert from + #define to... + (enum df_problem_id): ...this new enum. + (struct df_problem): Convert field "id" from "int" to + enum df_problem_id. + +2016-04-27 David Malcolm <dmalcolm@redhat.com> + * rtl.def: Update comment for "things in the instruction chain" to reflect the removal of the leading "i" field for INSN_UID in r210360. Fix bogus apostrophe. @@ -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; |