From a5bc619592eeccd87f45c0d85c8de6354fb4e6f7 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 4 Sep 2006 06:39:31 +0000 Subject: [PATCH] fixed lots of compilation errors (why is an unfinished file in cvs?) --- ir/be/beprofile.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/ir/be/beprofile.c b/ir/be/beprofile.c index 791741e01..c972a2996 100644 --- a/ir/be/beprofile.c +++ b/ir/be/beprofile.c @@ -21,6 +21,7 @@ #include "list.h" #include "pmap.h" +#include "entity.h" #include "irprintf.h" #include "irgwalk.h" #include "irdump_t.h" @@ -32,13 +33,6 @@ #include "execfreq.h" #include "irvrfy.h" -#include -#include -#include -#include -//#include -//#include - #include "be_t.h" #include "belive_t.h" #include "besched_t.h" @@ -61,7 +55,7 @@ typedef struct _block_id_walker_data { tarval **array; unsigned int id; - const ir_node *symconst; + ir_node *symconst; } block_id_walker_data; static void @@ -72,7 +66,7 @@ block_counter(ir_node * bb, void * data) } static unsigned int -count_blocks(const ir_graph * irg) +count_blocks(ir_graph * irg) { unsigned int count = 0; @@ -84,7 +78,7 @@ count_blocks(const ir_graph * irg) * Instrument a block with code needed for profiling */ static void -instrument_block(const ir_node * bb, const ir_node * address, unsigned int id) +instrument_block(ir_node * bb, ir_node * address, unsigned int id) { ir_node *load, *store, *offset, *add, *projm, *proji; @@ -97,6 +91,7 @@ instrument_block(const ir_node * bb, const ir_node * address, unsigned int id) keep_alive(new_r_Proj(get_irn_irg(bb), bb, load, mode_M, 0)); } +#if 0 /** * Generates a new irg which calls the initializer */ @@ -143,13 +138,14 @@ gen_initializer_irg(entity * bblock_id, entitiy * bblock_counts, entity * bblock return irg; } +#endif static void block_id_walker(ir_node * bb, void * data) { block_id_walker_data *wd = data; - *wd->array[wd->id] = new_tarval_from_long(get_irn_node_nr(bb), mode_Iu); + wd->array[wd->id] = new_tarval_from_long(get_irn_node_nr(bb), mode_Iu); instrument_block(bb, wd->symconst, wd->id); ++wd->id; } @@ -159,7 +155,7 @@ be_profile_instrument(void) { int n, i; unsigned int n_blocks = 0; - ir_entity *bblock_id, *bblock_counts, *bblock_count; + entity *bblock_id, *bblock_counts, *bblock_count; ir_type *array_type, *integer_type; tarval **tarval_array; @@ -180,11 +176,11 @@ be_profile_instrument(void) } /* initialize count array */ - tarval_array = alloca(sizeof(*null_array)*n_blocks); - for(i=0; i=0; --n) { ir_graph *irg = get_irp_irg(n); - irg_block_walk_graph(irg, block_id_walker, null, &wd); + irg_block_walk_graph(irg, block_id_walker, NULL, &wd); } - set_array_entitiy_values(bblock_id, tarval_array, n_blocks); + //set_array_entitiy_values(bblock_id, tarval_array, n_blocks); - gen_initializer_irg(bblock_id, bblock_counts, bblock_count); + //gen_initializer_irg(bblock_id, bblock_counts, bblock_count); } -- 2.20.1