From 2e72b2d3fbc5af4fbbb893526726a56e2c10bc9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20W=C3=BCrdig?= Date: Fri, 9 Feb 2007 19:06:32 +0000 Subject: [PATCH] changed type for callback --- ir/be/arm/bearch_arm.c | 2 +- ir/be/bearch.h | 2 +- ir/be/bemain.c | 10 +++------- ir/be/firm/bearch_firm.c | 2 +- ir/be/ia32/bearch_ia32.c | 2 +- ir/be/mips/bearch_mips.c | 2 +- ir/be/ppc32/bearch_ppc32.c | 2 +- 7 files changed, 9 insertions(+), 13 deletions(-) diff --git a/ir/be/arm/bearch_arm.c b/ir/be/arm/bearch_arm.c index 7240989e0..8bcb2b30c 100644 --- a/ir/be/arm/bearch_arm.c +++ b/ir/be/arm/bearch_arm.c @@ -1097,7 +1097,7 @@ static const be_machine_t *arm_get_machine(const void *self) { /** * Return irp irgs in the desired order. */ -static ir_graph **arm_get_irg_list(const void *self, ir_graph **irg_list) { +static ir_graph **arm_get_irg_list(const void *self, ir_graph ***irg_list) { return NULL; } diff --git a/ir/be/bearch.h b/ir/be/bearch.h index e017d8e36..810d60076 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -746,7 +746,7 @@ struct _arch_isa_if_t { * @param irgs A flexible array ARR_F of length 0 where the backend cann append the desired irgs. * @return A flexible array ARR_F containing all desired irgs in the desired order. */ - ir_graph **(*get_backend_irg_list)(const void *self, ir_graph **irgs); + ir_graph **(*get_backend_irg_list)(const void *self, ir_graph ***irgs); }; #define arch_isa_get_n_reg_class(isa) ((isa)->impl->get_n_reg_class(isa)) diff --git a/ir/be/bemain.c b/ir/be/bemain.c index 42dd4fe94..a37208a24 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -409,8 +409,8 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) be_dbg_types(env.db_handle); /* backend may provide an ordered list of irgs where code should be generated for */ - irg_list = NEW_ARR_F(ir_graph *, 0); - backend_irg_list = arch_isa_get_backend_irg_list(isa, irg_list); + irg_list = NEW_ARR_F(ir_graph *, 0); + backend_irg_list = arch_isa_get_backend_irg_list(isa, &irg_list); /* we might need 1 birg more for instrumentation constructor */ num_birgs = backend_irg_list ? ARR_LEN(backend_irg_list) : get_irp_n_irgs(); @@ -421,11 +421,7 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) ir_graph *irg = backend_irg_list ? backend_irg_list[i] : get_irp_irg(i); initialize_birg(&birgs[i], irg, &env); } - /* TODO: DEL_ARR_F(irg_list) will break, if list was modified by Backend ?!?! */ - if (backend_irg_list) - DEL_ARR_F(backend_irg_list); - else - DEL_ARR_F(irg_list); + DEL_ARR_F(irg_list); /* Get the filename for the profiling data. diff --git a/ir/be/firm/bearch_firm.c b/ir/be/firm/bearch_firm.c index a9bde2cef..0ee753d40 100644 --- a/ir/be/firm/bearch_firm.c +++ b/ir/be/firm/bearch_firm.c @@ -630,7 +630,7 @@ static const be_machine_t *firm_get_machine(const void *self) { /** * Return irp irgs in the desired order. */ -static ir_graph **firm_get_irg_list(const void *self, ir_graph **irg_list) { +static ir_graph **firm_get_irg_list(const void *self, ir_graph ***irg_list) { return NULL; } diff --git a/ir/be/ia32/bearch_ia32.c b/ir/be/ia32/bearch_ia32.c index 82a6ea75c..9f2650fdc 100644 --- a/ir/be/ia32/bearch_ia32.c +++ b/ir/be/ia32/bearch_ia32.c @@ -1892,7 +1892,7 @@ static const be_machine_t *ia32_get_machine(const void *self) { /** * Return irp irgs in the desired order. */ -static ir_graph **ia32_get_irg_list(const void *self, ir_graph **irg_list) { +static ir_graph **ia32_get_irg_list(const void *self, ir_graph ***irg_list) { return NULL; } diff --git a/ir/be/mips/bearch_mips.c b/ir/be/mips/bearch_mips.c index 7344cf4be..ae5be16ea 100644 --- a/ir/be/mips/bearch_mips.c +++ b/ir/be/mips/bearch_mips.c @@ -948,7 +948,7 @@ static const be_machine_t *mips_get_machine(const void *self) { /** * Return irp irgs in the desired order. */ -static ir_graph **mips_get_irg_list(const void *self, ir_graph **irg_list) { +static ir_graph **mips_get_irg_list(const void *self, ir_graph ***irg_list) { return NULL; } diff --git a/ir/be/ppc32/bearch_ppc32.c b/ir/be/ppc32/bearch_ppc32.c index 8d34e78ae..5ef844e54 100644 --- a/ir/be/ppc32/bearch_ppc32.c +++ b/ir/be/ppc32/bearch_ppc32.c @@ -887,7 +887,7 @@ static const be_machine_t *ppc32_get_machine(const void *self) { /** * Return irp irgs in the desired order. */ -static ir_graph **ppc32_get_irg_list(const void *self, ir_graph **irg_list) { +static ir_graph **ppc32_get_irg_list(const void *self, ir_graph ***irg_list) { return NULL; } -- 2.20.1