From ec0274cc8243b166b4a913413760d770b518a408 Mon Sep 17 00:00:00 2001 From: Adrien Guatto Date: Wed, 8 Feb 2012 17:49:21 +0100 Subject: [PATCH] C backend: do not inline consts by default. --- compiler/obc/c/cgen.ml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/obc/c/cgen.ml b/compiler/obc/c/cgen.ml index a4a36e4..e909d89 100644 --- a/compiler/obc/c/cgen.ml +++ b/compiler/obc/c/cgen.ml @@ -243,13 +243,9 @@ let rec cexpr_of_static_exp se = (List.fold_left (fun cc n -> Carraylit (repeat_list cc (int_of_static_exp n))) (cexpr_of_static_exp c) n_list) | Svar ln -> - if true || !Compiler_options.unroll_loops + if !Compiler_options.unroll_loops then cexpr_of_static_exp (Static.simplify QualEnv.empty (find_const ln).c_value) else Cvar (cname_of_qn ln) - (* (try - let cd = find_const ln in - cexpr_of_static_exp (Static.simplify QualEnv.empty cd.c_value) - with Not_found -> assert false) *) | Sop _ -> let se' = Static.simplify QualEnv.empty se in if se = se' then