projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
print out times and reverse perfect elimination order no disabled
[libfirm]
/
ir
/
common
/
firm.c
diff --git
a/ir/common/firm.c
b/ir/common/firm.c
index
2b2e8c9
..
9756939
100644
(file)
--- a/
ir/common/firm.c
+++ b/
ir/common/firm.c
@@
-30,16
+30,13
@@
#endif
#include <string.h>
#endif
#include <string.h>
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
+#include <stdio.h>
#include "lc_opts.h"
#include "ident_t.h"
#include "firm.h"
#include "irflag_t.h"
#include "lc_opts.h"
#include "ident_t.h"
#include "firm.h"
#include "irflag_t.h"
-/* init functions are not public */
#include "tv_t.h"
#include "tpop_t.h"
#include "irprog_t.h"
#include "tv_t.h"
#include "tpop_t.h"
#include "irprog_t.h"
@@
-49,33
+46,26
@@
#include "irgraph_t.h"
#include "type_t.h"
#include "entity_t.h"
#include "irgraph_t.h"
#include "type_t.h"
#include "entity_t.h"
-#include "opt_inline_t.h"
-#include "scalar_replace.h"
#include "firmstat.h"
#include "irarch.h"
#include "firmstat.h"
#include "irarch.h"
-#include "reassoc_t.h"
-#include "funccall_t.h"
#include "irhooks.h"
#include "iredges_t.h"
#include "irmemory_t.h"
#include "irhooks.h"
#include "iredges_t.h"
#include "irmemory_t.h"
-#include "
trop
t.h"
+#include "
opt_ini
t.h"
#include "debugger.h"
#include "be_t.h"
#include "debugger.h"
#include "be_t.h"
+#include "irtools.h"
/* returns the firm root */
/* returns the firm root */
-lc_opt_entry_t *firm_opt_get_root(void) {
+lc_opt_entry_t *firm_opt_get_root(void)
+{
static lc_opt_entry_t *grp = NULL;
if (!grp)
grp = lc_opt_get_grp(lc_opt_root_grp(), "firm");
return grp;
}
static lc_opt_entry_t *grp = NULL;
if (!grp)
grp = lc_opt_get_grp(lc_opt_root_grp(), "firm");
return grp;
}
-void firm_init_options(const char *arg_prefix, int argc, const char **argv) {
- /* parse commandline */
- lc_opt_from_argv(firm_opt_get_root(), arg_prefix, argc, argv, NULL);
-}
-
-void init_firm(const firm_parameter_t *param)
+void ir_init(const firm_parameter_t *param)
{
firm_parameter_t def_params;
unsigned int size;
{
firm_parameter_t def_params;
unsigned int size;
@@
-100,8
+90,6
@@
void init_firm(const firm_parameter_t *param)
firm_init_flags();
/* initialize all ident stuff */
init_ident(def_params.id_if, 1024);
firm_init_flags();
/* initialize all ident stuff */
init_ident(def_params.id_if, 1024);
- /* initialize Firm hooks */
- firm_init_hooks();
/* enhanced statistics, need idents and hooks */
firm_init_stat(def_params.enable_statistics);
/* Edges need hooks. */
/* enhanced statistics, need idents and hooks */
firm_init_stat(def_params.enable_statistics);
/* Edges need hooks. */
@@
-136,27
+124,29
@@
void init_firm(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(def_params.
builtin_dbg, def_params.
cc_mask);
+ firm_init_type(def_params.cc_mask);
/* initialize the entity module */
firm_init_entity();
/* initialize the entity module */
firm_init_entity();
- /* allocate a hash table. */
- init_type_identify(def_params.ti_if);
/* class cast optimization */
firm_init_class_casts_opt();
/* memory disambiguation */
firm_init_memory_disambiguator();
/* class cast optimization */
firm_init_class_casts_opt();
/* memory disambiguation */
firm_init_memory_disambiguator();
+ firm_init_loop_opt();
/* Init architecture dependent optimizations. */
arch_dep_init(arch_dep_default_factory);
arch_dep_set_opts(0);
/* Init architecture dependent optimizations. */
arch_dep_init(arch_dep_default_factory);
arch_dep_set_opts(0);
+ init_irnode();
+
#ifdef DEBUG_libfirm
/* integrated debugger extension */
firm_init_debugger();
#endif
}
#ifdef DEBUG_libfirm
/* integrated debugger extension */
firm_init_debugger();
#endif
}
-void free_firm(void) {
+void ir_finish(void)
+{
int i;
for (i = get_irp_n_irgs() - 1; i >= 0; --i)
int i;
for (i = get_irp_n_irgs() - 1; i >= 0; --i)
@@
-181,14
+171,26
@@
void free_firm(void) {
firm_be_finish();
}
firm_be_finish();
}
-/* Returns the libFirm version number. */
-void firm_get_version(firm_version_t *version) {
- version->major = libfirm_VERSION_MAJOR;
- version->minor = libfirm_VERSION_MINOR;
+unsigned ir_get_version_major(void)
+{
+ return libfirm_VERSION_MAJOR;
+}
+
+unsigned ir_get_version_minor(void)
+{
+ return libfirm_VERSION_MINOR;
+}
+
+const char *ir_get_version_revision(void)
+{
#ifdef libfirm_VERSION_REVISION
#ifdef libfirm_VERSION_REVISION
-
version->revision =
libfirm_VERSION_REVISION;
+
return
libfirm_VERSION_REVISION;
#else
#else
-
version->revision =
"";
+
return
"";
#endif
#endif
- version->build = "";
+}
+
+const char *ir_get_version_build(void)
+{
+ return "";
}
}