check constraints only for scheduled nodes
[libfirm] / ir / be / bemodule.c
index 32c1f61..5575b3c 100644 (file)
@@ -27,11 +27,15 @@ 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_sta(void);
 void be_init_ilpsched(void);
 void be_init_copyilp(void);
-void be_init_spillremat(void);
 void be_init_javacoal(void);
 void be_init_ra(void);
+void be_init_spillbelady(void);
+void be_init_spillmorgan(void);
+void be_init_spillremat(void);
+void be_init_ifg(void);
 
 void be_quit_copystat(void);
 
@@ -54,6 +58,9 @@ void be_init_modules(void)
        be_init_raextern();
        be_init_copystat();
        be_init_ra();
+       be_init_spillbelady();
+       be_init_spillmorgan();
+       be_init_ifg();
 
        be_init_arch_ia32();
        be_init_arch_ppc32();
@@ -69,6 +76,10 @@ void be_init_modules(void)
 #ifdef WITH_JVM
        be_init_javacoal();
 #endif
+
+#ifdef WITH_STA
+       be_init_arch_sta();
+#endif
 }
 
 void be_quit_modules(void)
@@ -84,6 +95,9 @@ typedef struct module_opt_data_t {
        be_module_list_entry_t * const *list_head;
 } module_opt_data_t;
 
+/**
+ * Beware: return value of 0 means error.
+ */
 static int set_opt_module(const char *name, lc_opt_type_t type, void *data,
                           size_t length, ...)
 {
@@ -91,6 +105,7 @@ static int set_opt_module(const char *name, lc_opt_type_t type, void *data,
        va_list args;
        const char* opt;
        const be_module_list_entry_t *module;
+       int res = 0;
 
        va_start(args, length);
        opt = va_arg(args, const char*);
@@ -98,12 +113,13 @@ static int set_opt_module(const char *name, lc_opt_type_t type, void *data,
        for(module = *(moddata->list_head); module != NULL; module = module->next) {
                if(strcmp(module->name, opt) == 0) {
                        *(moddata->var) = module->data;
+                       res = 1;
                        break;
                }
        }
        va_end(args);
 
-       return 0;
+       return res;
 }
 
 int dump_opt_module(char *buf, size_t buflen, const char *name,
@@ -156,7 +172,7 @@ void be_add_module_to_list(be_module_list_entry_t **list_head, const char *name,
        entry->name = name;
        entry->data = module;
        entry->next = *list_head;
-       *list_head = entry->next;
+       *list_head = entry;
 }
 
 void be_add_module_list_opt(lc_opt_entry_t *grp, const char *name,