do not free the graph after emitting it (this should only change the peak memory...
[libfirm] / ir / be / ia32 / bearch_ia32.c
index 86cdcc1..aa0d861 100644 (file)
@@ -872,7 +872,7 @@ static void ia32_before_abi(void *self)
                        mcount = new_entity(get_glob_type(), ID("mcount"), tp);
                        /* FIXME: enter the right ld_ident here */
                        set_entity_ld_ident(mcount, get_entity_ident(mcount));
-                       set_entity_linkage(mcount, IR_LINKAGE_EXTERN);
+                       set_entity_visibility(mcount, ir_visibility_external);
                }
                instrument_initcall(cg->irg, mcount);
        }
@@ -1713,12 +1713,6 @@ static arch_env_t *ia32_init(FILE *file_handle)
        be_emit_cstring(".Ltext0:\n");
        be_emit_write_line();
 
-       /* we mark referenced global entities, so we can only emit those which
-        * are actually referenced. (Note: you mustn't use the type visited flag
-        * elsewhere in the backend)
-        */
-       inc_master_type_visited();
-
        return &isa->arch_env;
 }
 
@@ -2250,12 +2244,8 @@ static bool mux_is_set(ir_node *sel, ir_node *mux_true, ir_node *mux_false)
                        && mode != mode_b)
                return false;
 
-       if (is_Const(mux_true) && is_Const_one(mux_true)
-                       && is_Const(mux_false) && is_Const_null(mux_false)) {
-               return true;
-       }
-       if (is_Const(mux_true) && is_Const_null(mux_true)
-                       && is_Const(mux_false) && is_Const_one(mux_false)) {
+       if (is_Const(mux_true) && is_Const(mux_false)) {
+               /* we can create a set plus up two 3 instructions for any combination of constants */
                return true;
        }
 
@@ -2344,6 +2334,9 @@ static int ia32_is_mux_allowed(ir_node *sel, ir_node *mux_false,
        mode = get_irn_mode(mux_true);
        if (get_mode_size_bits(mode) > 32)
                return false;
+       /* we can't handle MuxF yet */
+       if (mode_is_float(mode))
+               return false;
 
        if (mux_is_doz(sel, mux_true, mux_false))
                return true;