beifg: Factorise code to count interference components.
[libfirm] / ir / be / bemodule.c
index d3002ec..3fd65af 100644 (file)
@@ -1,20 +1,6 @@
 /*
- * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
- *
  * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
  */
 
 /**
@@ -22,7 +8,6 @@
  * @brief       Backend module interface.
  * @author      Matthias Braun
  * @date        29.09.2005
- * @version     $Id$
  */
 #include "config.h"
 
@@ -55,10 +40,9 @@ void be_init_copyilp2(void);
 void be_init_copynone(void);
 void be_init_copystat(void);
 void be_init_daemelspill(void);
-void be_init_dbgout(void);
+void be_init_dwarf(void);
 void be_init_arch_ia32(void);
 void be_init_arch_arm(void);
-void be_init_arch_sparc(void);
 void be_init_arch_amd64(void);
 void be_init_arch_sta(void);
 void be_init_arch_sparc(void);
@@ -68,7 +52,6 @@ void be_init_peephole(void);
 void be_init_ra(void);
 void be_init_spillbelady(void);
 void be_init_ssaconstr(void);
-void be_init_stabs(void);
 void be_init_pref_alloc(void);
 void be_init_irgmod(void);
 void be_init_loopana(void);
@@ -101,7 +84,6 @@ void be_init_modules(void)
        be_init_blocksched();
        be_init_spill();
        be_init_spilloptions();
-       be_init_dbgout();
 
        be_init_listsched();
        be_init_sched_normal();
@@ -117,22 +99,18 @@ void be_init_modules(void)
        be_init_copyheur4();
        be_init_copyheur();
        be_init_copyheur2();
-#ifdef WITH_ILP
        be_init_copyilp2();
-#endif
-#ifdef FIRM_KAPS
        be_init_pbqp_coloring();
-#endif
        be_init_copynone();
        be_init_copystat();
        be_init_peephole();
        be_init_ra();
        be_init_spillbelady();
        be_init_daemelspill();
+       be_init_dwarf();
        be_init_ssaconstr();
        be_init_pref_alloc();
        be_init_state();
-       be_init_stabs();
 
        be_init_arch_ia32();
        be_init_arch_arm();
@@ -140,13 +118,7 @@ void be_init_modules(void)
        be_init_arch_amd64();
        be_init_arch_TEMPLATE();
 
-#ifdef WITH_ILP
        be_init_copyilp();
-#endif /* WITH_ILP */
-
-#if PLUGIN_IR_BE_STA
-       be_init_arch_sta();
-#endif /* PLUGIN_IR_BE_STA */
 
 #ifdef FIRM_GRGEN_BE
        be_init_pbqp();
@@ -235,7 +207,7 @@ static int dump_opt_module_vals(char *buf, size_t buflen, const char *name,
        (void) len;
 
        for (module = *(moddata->list_head); module != NULL; module = module->next) {
-               size_t len = strlen(module->name);
+               size_t name_len = strlen(module->name);
 
                if (module != *(moddata->list_head)) {
                        p       = strncat(p, ", ", buflen - 1);
@@ -244,10 +216,10 @@ static int dump_opt_module_vals(char *buf, size_t buflen, const char *name,
 
                p = strncat(p, module->name, buflen - 1);
 
-               if (len >= buflen)
+               if (name_len >= buflen)
                        break;
 
-               buflen -= len;
+               buflen -= name_len;
        }
 
        return strlen(buf);