summaryrefslogtreecommitdiff
path: root/src/analysis/decomp
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-02-05 23:01:48 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-02-05 23:01:48 (GMT)
commit3467b0cdb09976faccc6dbef09315cc38dbe6fb5 (patch)
tree0e1b926be0203d8b95765cd56f7d3714414d89d4 /src/analysis/decomp
parent48e663f21a6429787fec2c426f46024dad9cde08 (diff)
Rewritten many parts of the process which cut code into basic blocks.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@338 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/decomp')
-rw-r--r--src/analysis/decomp/reduce.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analysis/decomp/reduce.c b/src/analysis/decomp/reduce.c
index 2d6fce3..c372f2a 100644
--- a/src/analysis/decomp/reduce.c
+++ b/src/analysis/decomp/reduce.c
@@ -332,7 +332,7 @@ static void replace_useless_variable(GDecInstruction *block, GHashTable *table)
while (g_hash_table_iter_next(&iter, (gpointer *)&var, (gpointer *)&val))
{
- replace = G_IS_IMM_EXPRESSION(val->value);
+ replace = (G_IS_IMM_EXPRESSION(val->value) && (val->used_counter > 1));
replace |= (val->used_counter == 2); /* 1 assign. + 1 usage */
if (!replace) continue;