2 * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
6 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the
9 * packaging of this file.
11 * Licensees holding valid libFirm Professional Edition licenses may use
12 * this file in accordance with the libFirm Commercial License.
13 * Agreement provided with the Software.
15 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * @brief read/write analyze of graph argument, which have mode reference
23 * @author Beyhan Veliev
26 #ifndef FIRM_ANA_ANALYZE_IRG_ARGS_H
27 #define FIRM_ANA_ANALYZE_IRG_ARGS_H
30 #include "firm_types.h"
33 * Returns for a method with pointer parameter
34 * if they will be read or written.
36 * @param ent The entity that represent this method.
37 * @param pos The position of method's parameter for that
38 * we need information.
40 * If the pos'th parameter is NOT of a pointer type, ptr_access_none
43 ptr_access_kind get_method_param_access(ir_entity *ent, int pos);
46 * Analyze how pointer arguments of a given
47 * ir graph are accessed.
49 * @param irg The ir graph to analyze.
51 void analyze_irg_args(ir_graph *irg);
54 * Returns for a method the 'weight' that every parameter
55 * has on optimization possibility. Higher values allows
56 * higher optimization with procedure cloning.
58 * The values are calculation on demand only.
60 float get_method_param_weight(ir_entity *ent, int pos);
63 * Analyze the parameters of a given ir graph.
65 * @param irg The ir graph to analyze.
67 void analyze_irg_args_weight(ir_graph *irg);