projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
is_lowered_type is now only used in asserts
[libfirm]
/
ir
/
be
/
bemodule.c
diff --git
a/ir/be/bemodule.c
b/ir/be/bemodule.c
index
8d1c33c
..
7ba3f57
100644
(file)
--- a/
ir/be/bemodule.c
+++ b/
ir/be/bemodule.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1995-200
7
University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-200
8
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
*
* This file is part of libFirm.
*
@@
-24,63
+24,74
@@
* @date 29.09.2005
* @version $Id$
*/
* @date 29.09.2005
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
-#endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <stdlib.h>
+#include <stdbool.h>
#include "bemodule_t.h"
#include "xmalloc.h"
#include "bemodule_t.h"
#include "xmalloc.h"
+void be_init_abi(void);
void be_init_sched(void);
void be_init_blocksched(void);
void be_init_spill(void);
void be_init_spilloptions(void);
void be_init_listsched(void);
void be_init_sched(void);
void be_init_blocksched(void);
void be_init_spill(void);
void be_init_spilloptions(void);
void be_init_listsched(void);
-void be_init_schedrss(void);
+void be_init_sched_rand(void);
+void be_init_sched_normal(void);
+void be_init_sched_regpress(void);
+void be_init_sched_trace(void);
+void be_init_sched_trivial(void);
void be_init_chordal(void);
void be_init_chordal(void);
+void be_init_pbqp_coloring(void);
void be_init_chordal_main(void);
void be_init_chordal_main(void);
-void be_init_copycoal(void);
+void be_init_chordal_common(void);
+void be_init_copyopt(void);
+void be_init_copyheur(void);
void be_init_copyheur2(void);
void be_init_copyheur2(void);
-void be_init_copyheur3(void);
void be_init_copyheur4(void);
void be_init_copyheur4(void);
+void be_init_copyilp2(void);
+void be_init_copynone(void);
void be_init_copystat(void);
void be_init_daemelspill(void);
void be_init_copystat(void);
void be_init_daemelspill(void);
+void be_init_dbgout(void);
void be_init_arch_ia32(void);
void be_init_arch_ia32(void);
-void be_init_arch_ppc32(void);
-void be_init_arch_mips(void);
void be_init_arch_arm(void);
void be_init_arch_arm(void);
+void be_init_arch_amd64(void);
void be_init_arch_sta(void);
void be_init_arch_sta(void);
-void be_init_ilpsched(void);
+void be_init_arch_sparc(void);
+void be_init_arch_TEMPLATE(void);
void be_init_copyilp(void);
void be_init_copyilp(void);
-void be_init_
javacoal
(void);
+void be_init_
peephole
(void);
void be_init_ra(void);
void be_init_spillbelady(void);
void be_init_ra(void);
void be_init_spillbelady(void);
-void be_init_spillmorgan(void);
-void be_init_spillremat(void);
void be_init_ssaconstr(void);
void be_init_ssaconstr(void);
-void be_init_ifg(void);
+void be_init_stabs(void);
+void be_init_pref_alloc(void);
void be_init_irgmod(void);
void be_init_loopana(void);
void be_init_spillslots(void);
void be_init_live(void);
void be_init_state(void);
void be_init_irgmod(void);
void be_init_loopana(void);
void be_init_spillslots(void);
void be_init_live(void);
void be_init_state(void);
+void be_init_pbqp(void);
void be_quit_copystat(void);
void be_quit_copystat(void);
+void be_quit_pbqp(void);
/**
/**
- * Driver for module intialization.
+ * Driver for module in
i
tialization.
* Call your module initialization function here.
*/
void be_init_modules(void)
{
* Call your module initialization function here.
*/
void be_init_modules(void)
{
- static
int run_once = 0
;
+ static
bool run_once = false
;
if (run_once)
return;
if (run_once)
return;
- run_once =
1
;
+ run_once =
true
;
+ be_init_abi();
be_init_irgmod();
be_init_loopana();
be_init_live();
be_init_irgmod();
be_init_loopana();
be_init_live();
@@
-89,46
+100,62
@@
void be_init_modules(void)
be_init_blocksched();
be_init_spill();
be_init_spilloptions();
be_init_blocksched();
be_init_spill();
be_init_spilloptions();
+ be_init_dbgout();
+
be_init_listsched();
be_init_listsched();
- be_init_schedrss();
+ be_init_sched_normal();
+ be_init_sched_trace();
+ be_init_sched_regpress();
+ be_init_sched_rand();
+ be_init_sched_trivial();
+
be_init_chordal_main();
be_init_chordal_main();
+ be_init_chordal_common();
be_init_chordal();
be_init_chordal();
- be_init_copycoal();
- be_init_copyheur2();
+ be_init_copyopt();
be_init_copyheur4();
be_init_copyheur4();
+ be_init_copyheur();
+ be_init_copyheur2();
+#ifdef WITH_ILP
+ be_init_copyilp2();
+#endif
+ be_init_pbqp_coloring();
+ be_init_copynone();
be_init_copystat();
be_init_copystat();
+ be_init_peephole();
be_init_ra();
be_init_spillbelady();
be_init_ra();
be_init_spillbelady();
- be_init_spillmorgan();
be_init_daemelspill();
be_init_ssaconstr();
be_init_daemelspill();
be_init_ssaconstr();
+ be_init_pref_alloc();
be_init_state();
be_init_state();
- be_init_
ifg
();
+ be_init_
stabs
();
be_init_arch_ia32();
be_init_arch_ia32();
- be_init_arch_ppc32();
- be_init_arch_mips();
be_init_arch_arm();
be_init_arch_arm();
+ be_init_arch_sparc();
+ be_init_arch_amd64();
+ be_init_arch_TEMPLATE();
#ifdef WITH_ILP
#ifdef WITH_ILP
- be_init_ilpsched();
be_init_copyilp();
be_init_copyilp();
- be_init_spillremat();
#endif /* WITH_ILP */
#endif /* WITH_ILP */
-#ifdef WITH_JVM
- be_init_copyheur3();
- be_init_javacoal();
-#endif /* WITH_JVM */
-
#if PLUGIN_IR_BE_STA
be_init_arch_sta();
#endif /* PLUGIN_IR_BE_STA */
#if PLUGIN_IR_BE_STA
be_init_arch_sta();
#endif /* PLUGIN_IR_BE_STA */
+
+#ifdef FIRM_GRGEN_BE
+ be_init_pbqp();
+#endif
}
void be_quit_modules(void)
{
be_quit_copystat();
}
void be_quit_modules(void)
{
be_quit_copystat();
+#ifdef FIRM_GRGEN_BE
+ be_quit_pbqp();
+#endif
}
//---------------------------------------------------------------------------
}
//---------------------------------------------------------------------------
@@
-145,11
+172,13
@@
typedef struct module_opt_data_t {
static int set_opt_module(const char *name, lc_opt_type_t type, void *data,
size_t length, ...)
{
static int set_opt_module(const char *name, lc_opt_type_t type, void *data,
size_t length, ...)
{
- module_opt_data_t *moddata = data;
+ module_opt_data_t *moddata =
(module_opt_data_t*)
data;
int res = 0;
va_list args;
const char *opt;
const be_module_list_entry_t *module;
int res = 0;
va_list args;
const char *opt;
const be_module_list_entry_t *module;
+ (void) type;
+ (void) name;
va_start(args, length);
opt = va_arg(args, const char*);
va_start(args, length);
opt = va_arg(args, const char*);
@@
-169,11
+198,14
@@
static int set_opt_module(const char *name, lc_opt_type_t type, void *data,
/**
* Dump the names of all registered module options.
*/
/**
* Dump the names of all registered module options.
*/
-int dump_opt_module(char *buf, size_t buflen, const char *name,
- lc_opt_type_t type, void *data, size_t length)
+
static
int dump_opt_module(char *buf, size_t buflen, const char *name,
+
lc_opt_type_t type, void *data, size_t length)
{
{
- module_opt_data_t *moddata = data;
+ module_opt_data_t *moddata =
(module_opt_data_t*)
data;
const be_module_list_entry_t *module;
const be_module_list_entry_t *module;
+ (void) name;
+ (void) type;
+ (void) length;
for (module = *(moddata->list_head); module != NULL; module = module->next) {
if (module->data == *(moddata->var)) {
for (module = *(moddata->list_head); module != NULL; module = module->next) {
if (module->data == *(moddata->var)) {
@@
-189,12
+221,15
@@
int dump_opt_module(char *buf, size_t buflen, const char *name,
/**
* Dump the values of all register module options.
*/
/**
* Dump the values of all register module options.
*/
-int dump_opt_module_vals(char *buf, size_t buflen, const char *name,
- lc_opt_type_t type, void *data, size_t len)
+
static
int dump_opt_module_vals(char *buf, size_t buflen, const char *name,
+
lc_opt_type_t type, void *data, size_t len)
{
{
- module_opt_data_t *moddata = data;
+ module_opt_data_t *moddata =
(module_opt_data_t*)
data;
char *p = buf;
const be_module_list_entry_t *module;
char *p = buf;
const be_module_list_entry_t *module;
+ (void) name;
+ (void) type;
+ (void) len;
for (module = *(moddata->list_head); module != NULL; module = module->next) {
size_t len = strlen(module->name);
for (module = *(moddata->list_head); module != NULL; module = module->next) {
size_t len = strlen(module->name);
@@
-221,9
+256,7
@@
int dump_opt_module_vals(char *buf, size_t buflen, const char *name,
void be_add_module_to_list(be_module_list_entry_t **list_head, const char *name,
void *module)
{
void be_add_module_to_list(be_module_list_entry_t **list_head, const char *name,
void *module)
{
- be_module_list_entry_t *entry;
-
- entry = xmalloc(sizeof(entry[0]));
+ be_module_list_entry_t *entry = XMALLOC(be_module_list_entry_t);
entry->name = name;
entry->data = module;
entry->next = *list_head;
entry->name = name;
entry->data = module;
entry->next = *list_head;
@@
-238,9
+271,7
@@
void be_add_module_list_opt(lc_opt_entry_t *grp, const char *name,
be_module_list_entry_t * const * list_head,
void **var)
{
be_module_list_entry_t * const * list_head,
void **var)
{
- module_opt_data_t *moddata;
-
- moddata = xmalloc(sizeof(moddata[0]));
+ module_opt_data_t *moddata = XMALLOC(module_opt_data_t);
moddata->var = var;
moddata->list_head = list_head;
moddata->var = var;
moddata->list_head = list_head;