2 #ifndef BDWY_SET_PROPERTY_H
3 #define BDWY_SET_PROPERTY_H
25 typedef std::map< memoryBlock *, int > memoryblock_position_map;
26 typedef memoryblock_position_map::iterator memoryblock_position_map_p;
30 typedef vector< memoryBlock * > memoryblock_vector;
31 typedef memoryblock_vector::iterator memoryblock_vector_p;
42 typedef list< memoryblock_bitset > memoryblock_bitset_list;
43 typedef memoryblock_bitset_list::iterator memoryblock_bitset_list_p;
44 typedef memoryblock_bitset_list::const_iterator memoryblock_bitset_list_cp;
46 typedef std::map< memoryAccess *, memoryblock_bitset_list> equiv_property_map;
47 typedef equiv_property_map::iterator equiv_property_map_p;
85 equiv_property_map _equivalence;
89 memoryblock_position_map _position_of_memoryblock;
93 memoryblock_vector _memoryblock_at_position;
149 void set_property_variable_block(memoryBlock * block)
157 memoryBlock * property_variable_block()
const {
return _block; }
192 void lookup_set_value(memoryAccess * def_or_use,
201 bool update_set_value(memoryAccess * def_or_use,
218 bool & found_reaching_value);
232 bool is_element_of(pointerValue & var);
244 void add_elements(pointerValue & var);
254 void apply_set_merge(memoryuse_list & phi_uses,
255 memoryblock_set & changes);
268 void to_top(memoryblock_bitset_list & bits);
274 void to_bottom(memoryblock_bitset_list & bits);
280 void meet(memoryblock_bitset_list & dest,
281 const memoryblock_bitset_list & src);
288 void lookup_equivalence_classes(memoryAccess * def_or_use,
289 memoryblock_bitset_list & bits);
297 bool update_equivalence_classes(memoryAccess * def_or_use,
298 memoryblock_bitset_list & classes);
308 void current_equivalence_classes(memoryblock_bitset_list & bits,
309 bool & found_reaching_value);
317 bool update_current_equivalence_classes(memoryblock_bitset_list & new_set);
323 bool is_equivalent(pointerValue & left,
324 pointerValue & right);
330 void add_equivalence(pointerValue & left,
331 pointerValue & right);
337 void apply_equivalence_merge(memoryuse_list & phi_uses,
338 memoryblock_set & changes);
348 void apply_next(memoryblock_set & changes);
355 void apply_merge(memoryuse_list & phi_uses,
356 memoryblock_set & changes);
364 void self_assignment(memoryblock_set & changes);
370 void report(std::ostream & out);
381 void print(std::ostream & o)
const;
389 void build_memoryblock_bitset(pointerValue & variables,
397 void add_equivalence_class(memoryblock_bitset_list & equiv,
404 bool is_same_equivalence(memoryblock_bitset_list & equiv1,
405 memoryblock_bitset_list & equiv2);
409 void print_memoryblock_bitset(
const std::string & label,
414 void print_memoryblock_bitset_list(
const std::string & label,
415 memoryblock_bitset_list & bits,