3 * File name: ir/ana/field_temperature.h
4 * Purpose: Compute an estimate of field temperature, i.e., field access heuristic.
5 * Author: Goetz Lindenmaier
9 * Copyright: (c) 2004 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
13 #ifndef _FIELD_TEMPERATURE_H_
14 #define _FIELD_TEMPERATURE_H_
17 * @file field_temperature.h
19 * Watch it! This is highly java dependent.
21 * - All Sel nodes get an array with possibly accessed entities.
22 * (resolve polymorphy on base of inherited entities.)
23 * (the mentioned entity in first approximation.)
25 * - Each entity gets all SymConst/Sel nodes, that reference the
26 * entity (Sel: references as accessed entity.)
28 * - We compute a value for the entity based on the Sel nodes.
36 /** The entities that can be accessed by this Sel node. */
37 int get_Sel_n_accessed_entities(ir_node *sel);
38 entity *get_Sel_accessed_entity (ir_node *sel, int pos);
41 /** Number of Load/Store nodes that possibly access this entity. */
42 int get_entity_n_accesses(entity *ent);
43 /** Load/Store node that possibly access this entity. */
44 ir_node *get_entity_access(entity *ent, int pos);
46 /** Number of Alloc nodes that create an instance of this type */
47 int get_type_n_allocations(type *tp);
48 /** Alloc node that create an instance of this type */
49 ir_node *get_type_allocation(type *tp, int pos);
52 /** Get the weighted interprocedural loop depth of the node.
53 The depth is estimated by a heuristic. */
54 int get_weighted_loop_depth(ir_node *n);
59 /** compute the field temperature. */
60 void compute_field_temperature(void);
62 /** free occupied memory, reset */
63 void free_field_temperature(void);
69 /** An auxiliary/temporary function */
70 int is_jack_rts_class(type *t);
72 #endif /* _FIELD_TEMPERATURE_H_ */