hooks are always enabled now -> one less option
[libfirm] / include / libfirm / analyze_irg_args.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
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.
10  *
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.
14  *
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
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief     read/write analyze of graph argument, which have mode reference
23  * @author    Beyhan Veliev
24  * @version   $Id$
25  */
26 #ifndef FIRM_ANA_ANALYZE_IRG_ARGS_H
27 #define FIRM_ANA_ANALYZE_IRG_ARGS_H
28
29 #include "irgraph.h"
30 #include "firm_types.h"
31
32 /**
33  * Returns for a method with pointer parameter
34  * if they will be read or written.
35  *
36  * @param ent  The entity that represent this method.
37  * @param pos  The position of method's parameter for that
38  *             we need information.
39
40  * If the pos'th parameter is NOT of a pointer type, ptr_access_none
41  * is returned;
42  */
43 ptr_access_kind get_method_param_access(ir_entity *ent, int pos);
44
45 /**
46  * Analyze how pointer arguments of a given
47  * ir graph are accessed.
48  *
49  * @param irg   The ir graph to analyze.
50  */
51 void analyze_irg_args(ir_graph *irg);
52
53 /**
54  * Returns for a method the 'weight' that every parameter
55  * has on optimization possibility. Higher values allows
56  * higher optimization with procedure cloning.
57  *
58  * The values are calculation on demand only.
59  */
60 unsigned get_method_param_weight(ir_entity *ent, int pos);
61
62 /**
63  * Analyze the parameters of a given ir graph.
64  *
65  * @param irg The ir graph to analyze.
66  */
67 void analyze_irg_args_weight(ir_graph *irg);
68
69 #endif