summaryrefslogtreecommitdiff
path: root/gcc/ira-costs.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2014-09-12 07:27:10 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-09-12 07:27:10 +0000
commit19c708dc8316d80ca3611106fd989b317d55b968 (patch)
tree839e2de96e8104f4dc92dbb429fc966fdab1fdd6 /gcc/ira-costs.c
parent44fc1b7b63f6d6ae9f9f618e0f6b7a40e06f08e3 (diff)
downloadgcc-19c708dc8316d80ca3611106fd989b317d55b968.tar.gz
ira.h (ira_finish_once): Delete.
gcc/ * ira.h (ira_finish_once): Delete. * ira-int.h (target_ira_int::~target_ira_int): Declare. (target_ira_int::free_ira_costs): Likewise. (target_ira_int::free_register_move_costs): Likewise. (ira_finish_costs_once): Delete. * ira.c (free_register_move_costs): Replace with... (target_ira_int::free_register_move_costs): ...this new function. (target_ira_int::~target_ira_int): Define. (ira_init): Call free_register_move_costs as a member function rather than a global function. (ira_finish_once): Delete. * ira-costs.c (free_ira_costs): Replace with... (target_ira_int::free_ira_costs): ...this new function. (ira_init_costs): Call free_ira_costs as a member function rather than a global function. (ira_finish_costs_once): Delete. * target-globals.c (target_globals::~target_globals): Call the target_ira_int destructor. * toplev.c: Include lra.h. (finalize): Call lra_finish_once rather than ira_finish_once. From-SVN: r215200
Diffstat (limited to 'gcc/ira-costs.c')
-rw-r--r--gcc/ira-costs.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
index 57239f5b19b..34da9a73ba3 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -2047,21 +2047,21 @@ ira_init_costs_once (void)
}
/* Free allocated temporary cost vectors. */
-static void
-free_ira_costs (void)
+void
+target_ira_int::free_ira_costs ()
{
int i;
- free (init_cost);
- init_cost = NULL;
+ free (x_init_cost);
+ x_init_cost = NULL;
for (i = 0; i < MAX_RECOG_OPERANDS; i++)
{
- free (op_costs[i]);
- free (this_op_costs[i]);
- op_costs[i] = this_op_costs[i] = NULL;
+ free (x_op_costs[i]);
+ free (x_this_op_costs[i]);
+ x_op_costs[i] = x_this_op_costs[i] = NULL;
}
- free (temp_costs);
- temp_costs = NULL;
+ free (x_temp_costs);
+ x_temp_costs = NULL;
}
/* This is called each time register related information is
@@ -2071,7 +2071,7 @@ ira_init_costs (void)
{
int i;
- free_ira_costs ();
+ this_target_ira_int->free_ira_costs ();
max_struct_costs_size
= sizeof (struct costs) + sizeof (int) * (ira_important_classes_num - 1);
/* Don't use ira_allocate because vectors live through several IRA
@@ -2088,13 +2088,6 @@ ira_init_costs (void)
temp_costs = (struct costs *) xmalloc (max_struct_costs_size);
}
-/* Function called once at the end of compiler work. */
-void
-ira_finish_costs_once (void)
-{
- free_ira_costs ();
-}
-
/* Common initialization function for ira_costs and