From d58463663d4d51ccb3addf72cfdbd0d3279ec580 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Thu, 9 Aug 2007 13:47:22 +0000 Subject: [PATCH] lower_intrinsics() now has an additional parameter alloweing part_block() to be used [r15510] --- include/libfirm/lowering.h | 7 ++++--- ir/lower/lower_intrinsics.c | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/libfirm/lowering.h b/include/libfirm/lowering.h index fa3f82546..bc9130088 100644 --- a/include/libfirm/lowering.h +++ b/include/libfirm/lowering.h @@ -261,12 +261,13 @@ typedef union _i_record { * * current_ir_graph is always set. * - * @param list an array of intrinsic map records - * @param length the length of the array + * @param list an array of intrinsic map records + * @param length the length of the array + * @param part_block_used set to true if part_block() must be using during lowering * * @return number of found intrinsics. */ -unsigned lower_intrinsics(i_record *list, int length); +unsigned lower_intrinsics(i_record *list, int length, int part_block_used); /** * A mapper for the integer absolute value: inttype abs(inttype v). diff --git a/ir/lower/lower_intrinsics.c b/ir/lower/lower_intrinsics.c index 1e77eb63c..466950bfb 100644 --- a/ir/lower/lower_intrinsics.c +++ b/ir/lower/lower_intrinsics.c @@ -89,7 +89,7 @@ static void call_mapper(ir_node *node, void *env) { } /* Go through all graphs and map calls to intrinsic functions. */ -unsigned lower_intrinsics(i_record *list, int length) { +unsigned lower_intrinsics(i_record *list, int length, int part_block_used) { int i, n_ops = get_irp_n_opcodes(); ir_graph *irg; pmap *c_map = pmap_create_ex(length); @@ -120,6 +120,9 @@ unsigned lower_intrinsics(i_record *list, int length) { for (i = get_irp_n_irgs() - 1; i >= 0; --i) { irg = get_irp_irg(i); + if (part_block_used) + collect_phiprojs(irg); + wenv.nr_of_intrinsics = 0; irg_walk_graph(irg, NULL, call_mapper, &wenv); -- 2.20.1