add functions to analyze the 'optimization' weight of method parameters
[libfirm] / ir / ana / analyze_irg_args.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/ana/analyze_irg_args.h
4  * Purpose:     rea/write analyze of graph argument, which have mode reference.
5  * Author:      Beyhan Veliev
6  * Created:
7  * CVS-ID:      $Id$
8  * Copyright:   (c) 1998-2005 Universität Karlsruhe
9  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
10  */
11 #ifndef _ANALYZE_IRG_ARGS_H_
12 #define _ANALYZE_IRG_ARGS_H_
13
14 #include "irgraph.h"
15 #include "entity.h"
16
17 /**
18  * Returns for a method with pointer parameter
19  * if they will be read or written.
20  *
21  * @param ent  The entity that represent this method.
22  * @param pos  The position of method's parameter for that
23  *             we need information.
24
25  * If the pos'th parameter is NOT of a pointer type, ptr_access_none
26  * is returned;
27  */
28 ptr_access_kind get_method_param_access(entity *ent, int pos);
29
30 /**
31  * Analyze how pointer arguments of a given
32  * ir graph are accessed.
33  *
34  * @param irg   The ir graph to analyze.
35  */
36 void analyze_irg_args(ir_graph *irg);
37
38 /**
39  * Returns for a method the 'weight' that every parameter
40  * has on optimization possibility. Higher values allows
41  * higher optimization with procedure cloning.
42  *
43  * The values are calculation on demand only.
44  */
45 float get_method_param_weight(entity *ent, int pos);
46
47 /**
48  * Analyze the parameters of a given ir graph.
49  *
50  * @param irg The ir graph to analyze.
51  */
52 void analyze_irg_args_weight(ir_graph *irg);
53
54 #endif /*_ANALYZE_IRG_ARGS_H_ */