Commit 0c331756 by Richard Sandiford Committed by Richard Sandiford

lra-int.h (lra_static_insn_data): Make operand_alternative a const pointer.

gcc/
	* lra-int.h (lra_static_insn_data): Make operand_alternative a
	const pointer.
	(target_lra_int, default_target_lra_int, this_target_lra_int)
	(op_alt_data): Delete.
	* lra.h (lra_init): Delete.
	* lra.c (default_target_lra_int, this_target_lra_int): Delete.
	(init_insn_code_data_once): Remove op_alt_data handling.
	(finish_insn_code_data_once): Likewise.
	(init_op_alt_data): Delete.
	(get_static_insn_data): Initialize operand_alternative to null.
	(free_insn_recog_data): Cast operand_alternative before freeing it.
	(setup_operand_alternative): Take the operand_alternative as
	parameter and assume it isn't already cached in the static
	insn data.
	(lra_set_insn_recog_data): Update accordingly.
	(lra_init): Delete.
	* ira.c (ira_init): Don't call lra_init.
	* target-globals.h (this_target_lra_int): Declare.
	(target_globals): Remove lra_int.
	(restore_target_globals): Update accordingly.
	* target-globals.c: Don't include lra-int.h.
	(default_target_globals, save_target_globals): Remove lra_int.

From-SVN: r211241
parent 1145837d
2014-06-04 Richard Sandiford <rdsandiford@googlemail.com> 2014-06-04 Richard Sandiford <rdsandiford@googlemail.com>
* lra-int.h (lra_static_insn_data): Make operand_alternative a
const pointer.
(target_lra_int, default_target_lra_int, this_target_lra_int)
(op_alt_data): Delete.
* lra.h (lra_init): Delete.
* lra.c (default_target_lra_int, this_target_lra_int): Delete.
(init_insn_code_data_once): Remove op_alt_data handling.
(finish_insn_code_data_once): Likewise.
(init_op_alt_data): Delete.
(get_static_insn_data): Initialize operand_alternative to null.
(free_insn_recog_data): Cast operand_alternative before freeing it.
(setup_operand_alternative): Take the operand_alternative as
parameter and assume it isn't already cached in the static
insn data.
(lra_set_insn_recog_data): Update accordingly.
(lra_init): Delete.
* ira.c (ira_init): Don't call lra_init.
* target-globals.h (this_target_lra_int): Declare.
(target_globals): Remove lra_int.
(restore_target_globals): Update accordingly.
* target-globals.c: Don't include lra-int.h.
(default_target_globals, save_target_globals): Remove lra_int.
2014-06-04 Richard Sandiford <rdsandiford@googlemail.com>
* recog.h (operand_alternative): Convert reg_class, reject, * recog.h (operand_alternative): Convert reg_class, reject,
matched and matches into bitfields. matched and matches into bitfields.
(preprocess_constraints): New overload. (preprocess_constraints): New overload.
......
...@@ -1715,7 +1715,6 @@ ira_init (void) ...@@ -1715,7 +1715,6 @@ ira_init (void)
clarify_prohibited_class_mode_regs (); clarify_prohibited_class_mode_regs ();
setup_hard_regno_aclass (); setup_hard_regno_aclass ();
ira_init_costs (); ira_init_costs ();
lra_init ();
} }
/* Function called once at the end of compiler work. */ /* Function called once at the end of compiler work. */
......
...@@ -202,7 +202,7 @@ struct lra_static_insn_data ...@@ -202,7 +202,7 @@ struct lra_static_insn_data
/* Array [n_alternatives][n_operand] of static constraint info for /* Array [n_alternatives][n_operand] of static constraint info for
given operand in given alternative. This info can be changed if given operand in given alternative. This info can be changed if
the target reg info is changed. */ the target reg info is changed. */
struct operand_alternative *operand_alternative; const struct operand_alternative *operand_alternative;
}; };
/* LRA internal info about an insn (LRA internal insn /* LRA internal info about an insn (LRA internal insn
...@@ -499,21 +499,3 @@ lra_assign_reg_val (int from, int to) ...@@ -499,21 +499,3 @@ lra_assign_reg_val (int from, int to)
lra_reg_info[to].val = lra_reg_info[from].val; lra_reg_info[to].val = lra_reg_info[from].val;
lra_reg_info[to].offset = lra_reg_info[from].offset; lra_reg_info[to].offset = lra_reg_info[from].offset;
} }
struct target_lra_int
{
/* Map INSN_UID -> the operand alternative data (NULL if unknown).
We assume that this data is valid until register info is changed
because classes in the data can be changed. */
struct operand_alternative *x_op_alt_data[LAST_INSN_CODE];
};
extern struct target_lra_int default_target_lra_int;
#if SWITCHABLE_TARGET
extern struct target_lra_int *this_target_lra_int;
#else
#define this_target_lra_int (&default_target_lra_int)
#endif
#define op_alt_data (this_target_lra_int->x_op_alt_data)
...@@ -36,5 +36,4 @@ extern rtx lra_create_new_reg (enum machine_mode, rtx, enum reg_class, ...@@ -36,5 +36,4 @@ extern rtx lra_create_new_reg (enum machine_mode, rtx, enum reg_class,
extern rtx lra_eliminate_regs (rtx, enum machine_mode, rtx); extern rtx lra_eliminate_regs (rtx, enum machine_mode, rtx);
extern void lra (FILE *); extern void lra (FILE *);
extern void lra_init_once (void); extern void lra_init_once (void);
extern void lra_init (void);
extern void lra_finish_once (void); extern void lra_finish_once (void);
...@@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. If not see
#include "libfuncs.h" #include "libfuncs.h"
#include "cfgloop.h" #include "cfgloop.h"
#include "ira-int.h" #include "ira-int.h"
#include "lra-int.h"
#include "builtins.h" #include "builtins.h"
#include "gcse.h" #include "gcse.h"
#include "bb-reorder.h" #include "bb-reorder.h"
...@@ -59,7 +58,6 @@ struct target_globals default_target_globals = { ...@@ -59,7 +58,6 @@ struct target_globals default_target_globals = {
&default_target_cfgloop, &default_target_cfgloop,
&default_target_ira, &default_target_ira,
&default_target_ira_int, &default_target_ira_int,
&default_target_lra_int,
&default_target_builtins, &default_target_builtins,
&default_target_gcse, &default_target_gcse,
&default_target_bb_reorder, &default_target_bb_reorder,
...@@ -96,7 +94,6 @@ save_target_globals (void) ...@@ -96,7 +94,6 @@ save_target_globals (void)
g->cfgloop = &p->cfgloop; g->cfgloop = &p->cfgloop;
g->ira = ggc_internal_cleared_alloc (sizeof (struct target_ira)); g->ira = ggc_internal_cleared_alloc (sizeof (struct target_ira));
g->ira_int = ggc_internal_cleared_alloc (sizeof (struct target_ira_int)); g->ira_int = ggc_internal_cleared_alloc (sizeof (struct target_ira_int));
g->lra_int = ggc_internal_cleared_alloc (sizeof (struct target_lra_int));
g->builtins = &p->builtins; g->builtins = &p->builtins;
g->gcse = &p->gcse; g->gcse = &p->gcse;
g->bb_reorder = &p->bb_reorder; g->bb_reorder = &p->bb_reorder;
......
...@@ -33,7 +33,6 @@ extern struct target_libfuncs *this_target_libfuncs; ...@@ -33,7 +33,6 @@ extern struct target_libfuncs *this_target_libfuncs;
extern struct target_cfgloop *this_target_cfgloop; extern struct target_cfgloop *this_target_cfgloop;
extern struct target_ira *this_target_ira; extern struct target_ira *this_target_ira;
extern struct target_ira_int *this_target_ira_int; extern struct target_ira_int *this_target_ira_int;
extern struct target_lra_int *this_target_lra_int;
extern struct target_builtins *this_target_builtins; extern struct target_builtins *this_target_builtins;
extern struct target_gcse *this_target_gcse; extern struct target_gcse *this_target_gcse;
extern struct target_bb_reorder *this_target_bb_reorder; extern struct target_bb_reorder *this_target_bb_reorder;
...@@ -53,7 +52,6 @@ struct GTY(()) target_globals { ...@@ -53,7 +52,6 @@ struct GTY(()) target_globals {
struct target_cfgloop *GTY((skip)) cfgloop; struct target_cfgloop *GTY((skip)) cfgloop;
void *GTY((atomic)) ira; void *GTY((atomic)) ira;
void *GTY((atomic)) ira_int; void *GTY((atomic)) ira_int;
void *GTY((atomic)) lra_int;
struct target_builtins *GTY((skip)) builtins; struct target_builtins *GTY((skip)) builtins;
struct target_gcse *GTY((skip)) gcse; struct target_gcse *GTY((skip)) gcse;
struct target_bb_reorder *GTY((skip)) bb_reorder; struct target_bb_reorder *GTY((skip)) bb_reorder;
...@@ -81,7 +79,6 @@ restore_target_globals (struct target_globals *g) ...@@ -81,7 +79,6 @@ restore_target_globals (struct target_globals *g)
this_target_cfgloop = g->cfgloop; this_target_cfgloop = g->cfgloop;
this_target_ira = (struct target_ira *) g->ira; this_target_ira = (struct target_ira *) g->ira;
this_target_ira_int = (struct target_ira_int *) g->ira_int; this_target_ira_int = (struct target_ira_int *) g->ira_int;
this_target_lra_int = (struct target_lra_int *) g->lra_int;
this_target_builtins = g->builtins; this_target_builtins = g->builtins;
this_target_gcse = g->gcse; this_target_gcse = g->gcse;
this_target_bb_reorder = g->bb_reorder; this_target_bb_reorder = g->bb_reorder;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment