2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief read/write analyze of graph argument, which have mode reference
9 * @author Beyhan Veliev
11 #ifndef FIRM_ANA_ANALYZE_IRG_ARGS_H
12 #define FIRM_ANA_ANALYZE_IRG_ARGS_H
15 #include "firm_types.h"
20 * Returns for a method with pointer parameter
21 * if they will be read or written.
23 * @param ent The entity that represent this method.
24 * @param pos The position of method's parameter for that
25 * we need information.
27 * If the pos'th parameter is NOT of a pointer type, ptr_access_none
30 FIRM_API ptr_access_kind get_method_param_access(ir_entity *ent, size_t pos);
33 * Analyze how pointer arguments of a given
34 * ir graph are accessed.
36 * @param irg The ir graph to analyze.
38 FIRM_API void analyze_irg_args(ir_graph *irg);
41 * Returns for a method the 'weight' that every parameter
42 * has on optimization possibility. Higher values allows
43 * higher optimization with procedure cloning.
45 * The values are calculation on demand only.
47 FIRM_API unsigned get_method_param_weight(ir_entity *ent, size_t pos);
50 * Analyze the parameters of a given ir graph.
52 * @param irg The ir graph to analyze.
54 FIRM_API void analyze_irg_args_weight(ir_graph *irg);