summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bepeephole.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-01-16 13:35:53 +0100
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-01-18 11:21:07 +0100
commit634830b6d4b9e339a33a0fd65cab0d828755848a (patch)
tree413272de97d43eee01905128a85173f157387433 /ir/be/bepeephole.c
parent1289d1b6a61462bcdf9ac3d64ac484e0d728e474 (diff)
be: Move the info about the register classes and registers struct the arch_env_t into struct arch_isa_if_t.
Diffstat (limited to 'ir/be/bepeephole.c')
-rw-r--r--ir/be/bepeephole.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ir/be/bepeephole.c b/ir/be/bepeephole.c
index 8577d11..736b165 100644
--- a/ir/be/bepeephole.c
+++ b/ir/be/bepeephole.c
@@ -27,10 +27,9 @@
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
-static const arch_env_t *arch_env;
-static be_lv_t *lv;
-static ir_node *current_node;
-ir_node **register_values;
+static be_lv_t *lv;
+static ir_node *current_node;
+ir_node **register_values;
static void clear_reg_value(ir_node *node)
{
@@ -158,7 +157,7 @@ static void process_block(ir_node *block, void *data)
(void)data;
/* construct initial register assignment */
- memset(register_values, 0, sizeof(ir_node*) * arch_env->n_registers);
+ memset(register_values, 0, sizeof(ir_node*) * isa_if->n_registers);
DB((dbg, LEVEL_1, "\nProcessing block %+F (from end)\n", block));
be_lv_foreach(lv, block, be_lv_state_end, node) {
@@ -406,10 +405,9 @@ void be_peephole_opt(ir_graph *irg)
{
be_assure_live_sets(irg);
- arch_env = be_get_irg_arch_env(irg);
- lv = be_get_irg_liveness(irg);
+ lv = be_get_irg_liveness(irg);
- register_values = XMALLOCN(ir_node*, arch_env->n_registers);
+ register_values = XMALLOCN(ir_node*, isa_if->n_registers);
irg_block_walk_graph(irg, process_block, NULL, NULL);