fix a few warnings/bugs in optimized mode
authorMatthias Braun <matze@braunis.de>
Tue, 6 Jul 2010 11:53:09 +0000 (11:53 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 6 Jul 2010 11:53:09 +0000 (11:53 +0000)
[r27704]

include/libfirm/interval_analysis.h
ir/be/beabi.c
ir/be/bespillutil.c

index e587cea..bec7181 100644 (file)
@@ -39,6 +39,7 @@
 #define FIRM_ANA_INTERVAL_ANALYSIS_H
 
 #include "firm_types.h"
+#include <stdio.h>
 #include "begin.h"
 
 /** The ins of regions:  regions are loops or blocks. */
index 9f3a5fb..6f1183f 100644 (file)
@@ -423,7 +423,6 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
        const arch_register_t *sp  = arch_env->sp;
        be_abi_call_t *call        = be_abi_call_new(sp->reg_class);
        ir_mode *mach_mode         = sp->reg_class->mode;
-       struct obstack *obst       = be_get_be_obst(irg);
        int no_alloc               = call->flags.bits.frame_is_setup_on_call;
        int n_res                  = get_method_n_ress(call_tp);
        int do_seq                 = call->flags.bits.store_args_sequential && !no_alloc;
@@ -454,7 +453,6 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
 
        /* Insert code to put the stack arguments on the stack. */
        assert(get_Call_n_params(irn) == n_params);
-       assert(obstack_object_size(obst) == 0);
        stack_param_idx = ALLOCAN(int, n_params);
        for (i = 0; i < n_params; ++i) {
                be_abi_call_arg_t *arg = get_call_arg(call, 0, i, 0);
@@ -653,7 +651,6 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
         */
        n_reg_results = n_res;
 
-       assert(obstack_object_size(obst) == 0);
        n_ins = 0;
        in    = ALLOCAN(ir_node*, n_reg_params + pset_new_size(&states));
 
index 96ec7b3..1aeb1a1 100644 (file)
@@ -191,12 +191,11 @@ void be_delete_spill_env(spill_env_t *env)
 void be_add_spill(spill_env_t *env, ir_node *to_spill, ir_node *after)
 {
        spill_info_t  *spill_info = get_spillinfo(env, to_spill);
-       const ir_node *insn       = skip_Proj_const(to_spill);
        spill_t       *spill;
        spill_t       *s;
        spill_t       *last;
 
-       assert(!arch_irn_is(insn, dont_spill));
+       assert(!arch_irn_is(skip_Proj_const(to_spill), dont_spill));
        DB((dbg, LEVEL_1, "Add spill of %+F after %+F\n", to_spill, after));
 
        /* Just for safety make sure that we do not insert the spill in front of a phi */
@@ -261,9 +260,8 @@ void be_add_reload2(spill_env_t *env, ir_node *to_spill, ir_node *before,
 {
        spill_info_t  *info;
        reloader_t    *rel;
-       const ir_node *insn = skip_Proj_const(to_spill);
 
-       assert(!arch_irn_is(insn, dont_spill));
+       assert(!arch_irn_is(skip_Proj_const(to_spill), dont_spill));
 
        info = get_spillinfo(env, to_spill);