It does not make any sense to remove AM, which loads a non-GP value to fix register...
[libfirm] / ir / tr / type_finalization.c
index d626897..8e8899d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -22,7 +22,7 @@
  * @brief   Calculate finalization of classes and entities by
  *          inspecting the class hierarchy.
  * @author  Michael Beck
- * @version $Id$
+ * @version $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 
 DEBUG_ONLY(static firm_dbg_module_t *dbg;)
 
-static void do_finalization(type_or_ent *tore, void *env) {
+static void do_finalization(type_or_ent tore, void *env) {
        ir_type *glob_tp = env;
 
-       if (is_type(tore)) {
-               ir_type *cls = (ir_type *)tore;
+       if (is_type(tore.typ)) {
+               ir_type *cls = tore.typ;
 
                if (! is_Class_type(cls) || cls == glob_tp)
                        return;
@@ -55,7 +55,7 @@ static void do_finalization(type_or_ent *tore, void *env) {
                                get_type_name(cls)));
                }
        } else {
-               ir_entity *ent = (ir_entity *)tore;
+               ir_entity *ent = tore.ent;
                ir_type *owner;
 
                if (is_entity_final(ent))
@@ -90,7 +90,6 @@ void types_calc_finalization(void) {
                return;
 
        FIRM_DBG_REGISTER(dbg, "firm.tr.finalization");
-//     firm_dbg_set_mask(dbg, SET_LEVEL_1);
 
        /* types must be visited before it's entities */
        type_walk(do_finalization, NULL, get_glob_type());