From 311220f83cf2486092013470bac4dd519a8089bd Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Tue, 14 Mar 2006 10:48:23 +0000 Subject: improve computation of used registers for reading from arrays, prevents incrementing counters too soon in many small loops using one array --- cgcalc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cgcalc.c b/cgcalc.c index 6287cf2..9fe8490 100644 --- a/cgcalc.c +++ b/cgcalc.c @@ -598,7 +598,6 @@ static void calculate_dyadic_non_commutative_operator (INSTRUCTION_GRAPH graph) graph->i_dregs=i_dregs; graph->order_alterable=graph->node_count<=1; - return; } static void calculate_dyadic_non_commutative_data_operator (INSTRUCTION_GRAPH graph) @@ -1541,8 +1540,11 @@ static void calculate_store_x_operator (INSTRUCTION_GRAPH graph) if (graph_1_before_reorder->order_mode==R_DREGISTER) i_dregs-=graph_1_before_reorder->order_alterable; - else + else { i_aregs-=graph_1_before_reorder->order_alterable; + if (graph_1_before_reorder->order_mode==R_MEMORY && u_dregsorder_mode==R_DREGISTER) -- cgit v1.2.3