X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fstat%2Ffirmstat_t.h;h=5757f9ca7a5698635cd36ebfa81b29468a870713;hb=44faeb9742640d3498eb4482f98eb1255607c4d6;hp=a96c3e9ab282c796c268a2684a3b5250278b08be;hpb=863d31d7a5c8210432fef88b30fc3e8353131538;p=libfirm diff --git a/ir/stat/firmstat_t.h b/ir/stat/firmstat_t.h index a96c3e9ab..5757f9ca7 100644 --- a/ir/stat/firmstat_t.h +++ b/ir/stat/firmstat_t.h @@ -1,19 +1,31 @@ /* - * Project: libFIRM - * File name: ir/stat/firmstat_t.h - * Purpose: Statistics for Firm. Internal data structures. - * Author: Michael Beck - * Created: - * CVS-ID: $Id$ - * Copyright: (c) 2004 Universität Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. */ -#ifndef _FIRMSTAT_T_H_ -#define _FIRMSTAT_T_H_ /** - * @file firmstat_t.h + * @file + * @brief Statistics for Firm. Internal data structures. + * @author Michael Beck + * @version $Id$ */ +#ifndef FIRM_STAT_FIRMSTAT_T_H +#define FIRM_STAT_FIRMSTAT_T_H + #include "firmstat.h" #include "irop_t.h" @@ -121,6 +133,7 @@ enum graph_counter_names { gcnt_call_with_all_cnst_arg, /**< number of calls with all const args */ gcnt_call_with_local_adr, /**< number of calls with address of local var args */ gcnt_indirect_calls, /**< number of indirect calls */ + gcnt_external_calls, /**< number of external calls */ gcnt_pure_adr_ops, /**< number of pure address operation */ gcnt_all_adr_ops, /**< number of all address operation */ gcnt_global_adr, /**< number of global load/store addresses. */ @@ -225,8 +238,10 @@ enum block_counter_names { * An entry for a block or extended block in a ir-graph */ typedef struct _block_entry_t { - counter_t cnt[_bcnt_last]; /**< counter */ - long block_nr; /**< block nr */ + counter_t cnt[_bcnt_last]; /**< counter */ + long block_nr; /**< block nr */ + unsigned is_start:1; /**< set, if it's the Start block. */ + unsigned is_end:1; /**< set, if it's the End block. */ } block_entry_t; /** An entry for an extended block in a ir-graph */ @@ -240,7 +255,7 @@ typedef enum _float_classify_t { STAT_FC_1, /**< the float value 1.0 */ STAT_FC_2, /**< the float value 2.0 */ STAT_FC_0_5, /**< the float value 0.5 */ - STAT_FC_EXACT, /**< an exact value */ + STAT_FC_POWER_OF_TWO, /**< another 2^x value */ STAT_FC_OTHER, /**< all other values */ STAT_FC_MAX /**< last value */ } float_classify_t; @@ -277,6 +292,11 @@ typedef void (*dump_const_table_FUNC)(dumper_t *dmp, const constant_info_t *tbl) */ typedef void (*dump_param_tbl_FUNC)(dumper_t *dmp, const distrib_tbl_t *tbl, graph_entry_t *global); +/** + * dumps the optimizations counter + */ +typedef void (*dump_opt_cnt_FUNC)(dumper_t *dumper, const counter_t *tbl, unsigned len); + /** * handler for dumper init * @@ -311,12 +331,15 @@ typedef struct _statistic_info_t { ir_op *op_DivC; /**< pseudo op for division by const */ ir_op *op_ModC; /**< pseudo op for modulo by const */ ir_op *op_DivModC; /**< pseudo op for DivMod by const */ + ir_op *op_QuotC; /**< pseudo op for floating point division by const */ ir_op *op_SelSel; /**< pseudo op for Sel(Sel) */ ir_op *op_SelSelSel; /**< pseudo op for Sel(Sel(Sel)) */ dumper_t *dumper; /**< list of dumper */ int reassoc_run; /**< if set, reassociation is running */ constant_info_t const_info; /**< statistic info for constants */ - distrib_tbl_t *dist_param_cnt; /**< distributation table for call parameters */ + distrib_tbl_t *dist_param_cnt; /**< distribution table for call parameters */ + + counter_t num_opts[FS_OPT_MAX];/**< count optimizations */ } stat_info_t; /** @@ -325,7 +348,8 @@ typedef struct _statistic_info_t { struct _dumper_t { dump_graph_FUNC dump_graph; /**< handler for dumping an irg */ dump_const_table_FUNC dump_const_tbl; /**< handler for dumping a const table */ - dump_param_tbl_FUNC dump_param_tbl; /**< handler for dumper the Call parameter table */ + dump_param_tbl_FUNC dump_param_tbl; /**< handler for dumping the Call parameter table */ + dump_opt_cnt_FUNC dump_opt_cnt; /**< handler for dumping the optimization table. */ dump_init_FUNC init; /**< handler for init */ dump_finish_FUNC finish; /**< handler for finish */ FILE *f; /**< the file to dump to */ @@ -490,4 +514,4 @@ void stat_be_block_stat_permcycle(const char *class_name, ir_node *perm, ir_node */ void stat_register_dumper_func(dump_graph_FUNC func); -#endif /* _FIRMSTAT_T_H_ */ +#endif /* FIRM_STAT_FIRMSTAT_T_H */