properly mark symbols in the public API to be exported. This allows us to use -fvisib...
[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 #include "typerep.h"
32 #include "begin.h"
33
34 /**
35  * Returns for a method with pointer parameter
36  * if they will be read or written.
37  *
38  * @param ent  The entity that represent this method.
39  * @param pos  The position of method's parameter for that
40  *             we need information.
41
42  * If the pos'th parameter is NOT of a pointer type, ptr_access_none
43  * is returned;
44  */
45 FIRM_DLL ptr_access_kind get_method_param_access(ir_entity *ent, int pos);
46
47 /**
48  * Analyze how pointer arguments of a given
49  * ir graph are accessed.
50  *
51  * @param irg   The ir graph to analyze.
52  */
53 FIRM_DLL void analyze_irg_args(ir_graph *irg);
54
55 /**
56  * Returns for a method the 'weight' that every parameter
57  * has on optimization possibility. Higher values allows
58  * higher optimization with procedure cloning.
59  *
60  * The values are calculation on demand only.
61  */
62 FIRM_DLL unsigned get_method_param_weight(ir_entity *ent, int pos);
63
64 /**
65  * Analyze the parameters of a given ir graph.
66  *
67  * @param irg The ir graph to analyze.
68  */
69 FIRM_DLL void analyze_irg_args_weight(ir_graph *irg);
70
71 #include "end.h"
72
73 #endif