C backend: do not inline consts by default.

This commit is contained in:
Adrien Guatto 2012-02-08 17:49:21 +01:00
parent fa09d86dc1
commit ec0274cc82

View file

@ -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