From 337455c9f2e0222d6752182dfc44ca8059050a0d Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Sat, 9 Jan 2010 01:26:19 +0000 Subject: [PATCH] the find_pointer_type interface still needs a mode because we might have pointers with different modes ... small C99 fix [r26937] --- include/libfirm/lowering.h | 2 +- ir/ir/irgmod.c | 4 ++-- ir/lower/lower_calls.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/libfirm/lowering.h b/include/libfirm/lowering.h index a4465b1bc..9f0c62373 100644 --- a/include/libfirm/lowering.h +++ b/include/libfirm/lowering.h @@ -63,7 +63,7 @@ typedef struct { * A function returning a pointer type for a given type. * If this pointer is NULL, a new pointer type is always created. */ - ir_type *(*find_pointer_type)(ir_type *e_type, int alignment); + ir_type *(*find_pointer_type)(ir_type *e_type, ir_mode *mode, int alignment); /** * If the LF_SMALL_CMP_IN_REGS flag is set, this function will be called diff --git a/ir/ir/irgmod.c b/ir/ir/irgmod.c index 2f61e6276..5af1b94a9 100644 --- a/ir/ir/irgmod.c +++ b/ir/ir/irgmod.c @@ -197,12 +197,12 @@ void part_block(ir_node *node) { ir_node *phi, *jmp, *next, *block; ir_graph *rem = current_ir_graph; - current_ir_graph = get_irn_irg(node); - /* Turn off optimizations so that blocks are not merged again. */ int rem_opt = get_opt_optimize(); set_optimize(0); + current_ir_graph = get_irn_irg(node); + /* Transform the control flow */ old_block = get_nodes_block(node); mbh = get_Block_MacroBlock(old_block); diff --git a/ir/lower/lower_calls.c b/ir/lower/lower_calls.c index 6f71e0f90..6eb9f88d8 100644 --- a/ir/lower/lower_calls.c +++ b/ir/lower/lower_calls.c @@ -129,7 +129,7 @@ static ir_type *create_modified_mtd_type(const lower_params_t *lp, ir_type *mtp) else { /* this compound will be allocated on callers stack and its address will be transmitted as a hidden parameter. */ - ptr_tp = lp->find_pointer_type(res_tp, lp->def_ptr_alignment); + ptr_tp = lp->find_pointer_type(res_tp, get_modeP_data(), lp->def_ptr_alignment); params[nn_params] = ptr_tp; param_map[nn_params] = -1 - i; ++nn_params; @@ -164,7 +164,7 @@ static ir_type *create_modified_mtd_type(const lower_params_t *lp, ir_type *mtp) res_tp = get_method_res_type(mtp, i); if (is_compound_type(res_tp)) { - params[nn_params] = lp->find_pointer_type(res_tp, lp->def_ptr_alignment); + params[nn_params] = lp->find_pointer_type(res_tp, get_modeP_data(), lp->def_ptr_alignment); param_map[nn_params] = -1 - i; ++nn_params; } else { -- 2.20.1