From d0b3f40e4917dc2cdfcfd14b35ff8942964c230a Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 6 Jul 2010 11:53:09 +0000 Subject: [PATCH] fix a few warnings/bugs in optimized mode [r27704] --- include/libfirm/interval_analysis.h | 1 + ir/be/beabi.c | 3 --- ir/be/bespillutil.c | 6 ++---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/libfirm/interval_analysis.h b/include/libfirm/interval_analysis.h index e587cea74..bec718107 100644 --- a/include/libfirm/interval_analysis.h +++ b/include/libfirm/interval_analysis.h @@ -39,6 +39,7 @@ #define FIRM_ANA_INTERVAL_ANALYSIS_H #include "firm_types.h" +#include #include "begin.h" /** The ins of regions: regions are loops or blocks. */ diff --git a/ir/be/beabi.c b/ir/be/beabi.c index 9f3a5fb34..6f1183f78 100644 --- a/ir/be/beabi.c +++ b/ir/be/beabi.c @@ -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)); diff --git a/ir/be/bespillutil.c b/ir/be/bespillutil.c index 96ec7b38e..1aeb1a104 100644 --- a/ir/be/bespillutil.c +++ b/ir/be/bespillutil.c @@ -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); -- 2.20.1