projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
extend switch lowerer to produce the out-of-bounds check in firm-IR if necessary
[libfirm]
/
ir
/
common
/
firm.c
diff --git
a/ir/common/firm.c
b/ir/common/firm.c
index
e6d3196
..
71ad318
100644
(file)
--- a/
ir/common/firm.c
+++ b/
ir/common/firm.c
@@
-89,9
+89,10
@@
void ir_init(const firm_parameter_t *param)
/* initialize firm flags */
firm_init_flags();
/* initialize all ident stuff */
/* initialize firm flags */
firm_init_flags();
/* initialize all ident stuff */
- init_ident(
def_params.id_if, 1024
);
+ init_ident();
/* enhanced statistics, need idents and hooks */
/* enhanced statistics, need idents and hooks */
- firm_init_stat(def_params.enable_statistics);
+ if (def_params.enable_statistics != 0)
+ firm_init_stat(def_params.enable_statistics);
/* Edges need hooks. */
init_edges();
/* create the type kinds. */
/* Edges need hooks. */
init_edges();
/* create the type kinds. */
@@
-111,7
+112,9
@@
void ir_init(const firm_parameter_t *param)
/* initialize all op codes an irnode can consist of */
init_op();
/* called once for each run of this library */
/* initialize all op codes an irnode can consist of */
init_op();
/* called once for each run of this library */
- ir_set_uninitialized_local_variable_func(def_params.initialize_local_func);
+ if (def_params.initialize_local_func != NULL)
+ ir_set_uninitialized_local_variable_func(
+ def_params.initialize_local_func);
/* initialize reassociation */
firm_init_reassociation();
/* initialize function call optimization */
/* initialize reassociation */
firm_init_reassociation();
/* initialize function call optimization */
@@
-124,9
+127,9
@@
void ir_init(const firm_parameter_t *param)
later. */
init_irprog_2();
/* Initialize the type module and construct some idents needed. */
later. */
init_irprog_2();
/* Initialize the type module and construct some idents needed. */
-
firm
_init_type();
+
ir
_init_type();
/* initialize the entity module */
/* initialize the entity module */
-
firm
_init_entity();
+
ir
_init_entity();
/* class cast optimization */
firm_init_class_casts_opt();
/* memory disambiguation */
/* class cast optimization */
firm_init_class_casts_opt();
/* memory disambiguation */
@@
-134,7
+137,6
@@
void ir_init(const firm_parameter_t *param)
firm_init_loop_opt();
/* Init architecture dependent optimizations. */
firm_init_loop_opt();
/* Init architecture dependent optimizations. */
- arch_dep_init(arch_dep_default_factory);
arch_dep_set_opts(0);
init_irnode();
arch_dep_set_opts(0);
init_irnode();
@@
-151,8
+153,6
@@
void ir_finish(void)
for (i = get_irp_n_irgs() - 1; i >= 0; --i)
free_ir_graph(get_irp_irg(i));
for (i = get_irp_n_irgs() - 1; i >= 0; --i)
free_ir_graph(get_irp_irg(i));
- for (i = get_irp_n_pseudo_irgs() - 1; i >= 0; --i)
- free_ir_graph(get_irp_pseudo_irg(i));
free_type_entities(get_glob_type());
for (i = get_irp_n_types() - 1; i >= 0; --i)
free_type_entities(get_glob_type());
for (i = get_irp_n_types() - 1; i >= 0; --i)
@@
-163,6
+163,9
@@
void ir_finish(void)
free_ir_prog();
free_ir_prog();
+ ir_finish_entity();
+ ir_finish_type();
+
finish_tarval();
finish_mode();
finish_tpop();
finish_tarval();
finish_mode();
finish_tpop();