df: make df_problem instances "const"
The various struct df_problem instances are constant data; mark them as such. gcc/ChangeLog: * df-core.c (df_add_problem): Make the problem param be const. (df_remove_problem): Make local "problem" be const. * df-problems.c (problem_RD): Make const. (problem_LR): Likewise. (problem_LIVE): Likewise. (problem_MIR): Likewise. (problem_CHAIN): Likewise. (problem_WORD_LR): Likewise. (problem_NOTE): Likewise. (problem_MD): Likewise. * df-scan.c (problem_SCAN): Likewise. * df.h (struct df_problem): Make field "dependent_problem" be const. (struct dataflow): Likewise for field "problem". (df_add_problem): Make param const. From-SVN: r235524
This commit is contained in:
parent
98544adc26
commit
fdd5680ca7
|
@ -1,3 +1,21 @@
|
|||
2016-04-27 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
* df-core.c (df_add_problem): Make the problem param be const.
|
||||
(df_remove_problem): Make local "problem" be const.
|
||||
* df-problems.c (problem_RD): Make const.
|
||||
(problem_LR): Likewise.
|
||||
(problem_LIVE): Likewise.
|
||||
(problem_MIR): Likewise.
|
||||
(problem_CHAIN): Likewise.
|
||||
(problem_WORD_LR): Likewise.
|
||||
(problem_NOTE): Likewise.
|
||||
(problem_MD): Likewise.
|
||||
* df-scan.c (problem_SCAN): Likewise.
|
||||
* df.h (struct df_problem): Make field "dependent_problem" be
|
||||
const.
|
||||
(struct dataflow): Likewise for field "problem".
|
||||
(df_add_problem): Make param const.
|
||||
|
||||
2016-04-27 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.c (ix86_spill_class): Enable for TARGET_SSE2 when
|
||||
|
|
|
@ -411,7 +411,7 @@ struct df_d *df;
|
|||
/* Add PROBLEM (and any dependent problems) to the DF instance. */
|
||||
|
||||
void
|
||||
df_add_problem (struct df_problem *problem)
|
||||
df_add_problem (const struct df_problem *problem)
|
||||
{
|
||||
struct dataflow *dflow;
|
||||
int i;
|
||||
|
@ -584,7 +584,7 @@ df_set_blocks (bitmap blocks)
|
|||
void
|
||||
df_remove_problem (struct dataflow *dflow)
|
||||
{
|
||||
struct df_problem *problem;
|
||||
const struct df_problem *problem;
|
||||
int i;
|
||||
|
||||
if (!dflow)
|
||||
|
|
|
@ -668,7 +668,7 @@ df_rd_bottom_dump (basic_block bb, FILE *file)
|
|||
|
||||
/* All of the information associated with every instance of the problem. */
|
||||
|
||||
static struct df_problem problem_RD =
|
||||
static const struct df_problem problem_RD =
|
||||
{
|
||||
DF_RD, /* Problem id. */
|
||||
DF_FORWARD, /* Direction. */
|
||||
|
@ -1190,7 +1190,7 @@ df_lr_verify_solution_end (void)
|
|||
|
||||
/* All of the information associated with every instance of the problem. */
|
||||
|
||||
static struct df_problem problem_LR =
|
||||
static const struct df_problem problem_LR =
|
||||
{
|
||||
DF_LR, /* Problem id. */
|
||||
DF_BACKWARD, /* Direction. */
|
||||
|
@ -1718,7 +1718,7 @@ df_live_verify_solution_end (void)
|
|||
|
||||
/* All of the information associated with every instance of the problem. */
|
||||
|
||||
static struct df_problem problem_LIVE =
|
||||
static const struct df_problem problem_LIVE =
|
||||
{
|
||||
DF_LIVE, /* Problem id. */
|
||||
DF_FORWARD, /* Direction. */
|
||||
|
@ -2169,7 +2169,7 @@ df_mir_verify_solution_end (void)
|
|||
|
||||
/* All of the information associated with every instance of the problem. */
|
||||
|
||||
static struct df_problem problem_MIR =
|
||||
static const struct df_problem problem_MIR =
|
||||
{
|
||||
DF_MIR, /* Problem id. */
|
||||
DF_FORWARD, /* Direction. */
|
||||
|
@ -2641,7 +2641,7 @@ df_chain_insn_bottom_dump (const rtx_insn *insn, FILE *file)
|
|||
}
|
||||
}
|
||||
|
||||
static struct df_problem problem_CHAIN =
|
||||
static const struct df_problem problem_CHAIN =
|
||||
{
|
||||
DF_CHAIN, /* Problem id. */
|
||||
DF_NONE, /* Direction. */
|
||||
|
@ -3008,7 +3008,7 @@ df_word_lr_bottom_dump (basic_block bb, FILE *file)
|
|||
|
||||
/* All of the information associated with every instance of the problem. */
|
||||
|
||||
static struct df_problem problem_WORD_LR =
|
||||
static const struct df_problem problem_WORD_LR =
|
||||
{
|
||||
DF_WORD_LR, /* Problem id. */
|
||||
DF_BACKWARD, /* Direction. */
|
||||
|
@ -3683,7 +3683,7 @@ df_note_free (void)
|
|||
|
||||
/* All of the information associated every instance of the problem. */
|
||||
|
||||
static struct df_problem problem_NOTE =
|
||||
static const struct df_problem problem_NOTE =
|
||||
{
|
||||
DF_NOTE, /* Problem id. */
|
||||
DF_NONE, /* Direction. */
|
||||
|
@ -4693,7 +4693,7 @@ df_md_bottom_dump (basic_block bb, FILE *file)
|
|||
df_print_regset (file, &bb_info->out);
|
||||
}
|
||||
|
||||
static struct df_problem problem_MD =
|
||||
static const struct df_problem problem_MD =
|
||||
{
|
||||
DF_MD, /* Problem id. */
|
||||
DF_FORWARD, /* Direction. */
|
||||
|
|
|
@ -396,7 +396,7 @@ df_scan_start_block (basic_block bb, FILE *file)
|
|||
#endif
|
||||
}
|
||||
|
||||
static struct df_problem problem_SCAN =
|
||||
static const struct df_problem problem_SCAN =
|
||||
{
|
||||
DF_SCAN, /* Problem id. */
|
||||
DF_NONE, /* Direction. */
|
||||
|
|
6
gcc/df.h
6
gcc/df.h
|
@ -275,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. */
|
||||
|
@ -290,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. */
|
||||
|
@ -948,7 +948,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);
|
||||
|
|
Loading…
Reference in New Issue