PIPS
alias-classes.h
Go to the documentation of this file.
1 /* Warning! Do not modify this file that is automatically generated! */
2 /* Modify src/Libs/alias-classes/alias-classes-local.h instead, to add your own modifications. */
3 
4 /* header file built by cproto */
5 
6 #ifndef alias_classes_header_included
7 #define alias_classes_header_included
8 /* alias_classes-local.h */
9 /*
10 
11  $Id: alias-classes-local.h 23065 2016-03-02 09:05:50Z coelho $
12 
13  Copyright 1989-2016 MINES ParisTech
14 
15  This file is part of PIPS.
16 
17  PIPS is free software: you can redistribute it and/or modify it
18  under the terms of the GNU General Public License as published by
19  the Free Software Foundation, either version 3 of the License, or
20  any later version.
21 
22  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
23  WARRANTY; without even the implied warranty of MERCHANTABILITY or
24  FITNESS FOR A PARTICULAR PURPOSE.
25 
26  See the GNU General Public License for more details.
27 
28  You should have received a copy of the GNU General Public License
29  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
30 
31 */
32 #include "points_to_private.h"
33 #include "effects.h"
34 #define SEQUENTIAL_POINTS_TO_SETS_SUFFIX ".pt"
35 #define USER_POINTS_TO_SETS_SUFFIX ".upt"
36 
37 // FI: just in case another data structure would be more suitable or
38 // more efficient
39 // For instance, set of points-to could be a type declared in
40 // points_to_private.tex
41 #if 0
42 typedef set pt_map;
43 #define pt_map_undefined set_undefined
44 #define pt_map_undefined_p(pt) ((pt)==set_undefined)
45 #define new_pt_map() set_generic_make(set_private, points_to_equal_p, points_to_rank)
46 #define assign_pt_map(x,y) set_assign(x, y)
47 #define clear_pt_map(pt) set_clear(pt)
48 #define free_pt_map(pt) set_free(pt)
49 #define print_pt_map(pt) print_points_to_set("",pt);
50 // FI: varargs; probably OK with gcc preprocessor
51 #define free_pt_maps sets_free
52 #define union_of_pt_maps(pt1, pt2, pt3) set_union(pt1, pt2, pt3)
53 #define difference_of_pt_maps(pt1, pt2, pt3) set_difference(pt1, pt2, pt3)
54 
55 #define empty_pt_map_p(s) set_empty_p(s)
56 #define consistent_pt_map_p(s) consistent_points_to_set(s)
57 // FI: Not so sure we do not need a new name
58 #define source_in_pt_map_p(cell,set) source_in_set_p(cell,set)
59 #define add_arc_to_pt_map(a, s) set_add_element((set) s, (set) s, (void *) a)
60 
61 // FI: useful to have a function for debugging
62 #define remove_arc_from_pt_map(a, s) set_del_element((set) s, (set) s, (void *) a)
63 
64 // A reminder:
65 // full_copy_pt_map(pt_map m)
66 #else
68 #define pt_map_undefined points_to_graph_undefined
69 #define pt_map_undefined_p(pt) ((pt)==points_to_graph_undefined)
70 #define new_pt_map() make_points_to_graph(false, set_generic_make(set_private, points_to_equal_p, points_to_rank))
71 #define new_simple_pt_map() set_generic_make(set_private, points_to_equal_p, points_to_rank)
72 #define assign_pt_map(x,y) ((void) set_assign(points_to_graph_set(x), points_to_graph_set(y)), (x))
73 #define clear_pt_map(pt) set_clear(points_to_graph_set(pt))
74 // FI: free_set() is a shallow free, free_points_to_graph() is a deep free
75 #define free_pt_map(pt) free_points_to_graph(pt)
76 #define print_pt_map(pt) print_points_to_set("", points_to_graph_set(pt));
77 // FI: varargs; probably OK with gcc preprocessor
78 #define free_pt_maps free_points_to_graph_sets
79 
80 #define union_of_pt_maps(pt1, pt2, pt3) set_union(points_to_graph_set(pt1), \
81  points_to_graph_set(pt2), \
82  points_to_graph_set(pt3))
83 #define difference_of_pt_maps(pt1, pt2, pt3) \
84  set_difference(points_to_graph_set(pt1), \
85  points_to_graph_set(pt2), \
86  points_to_graph_set(pt3))
87 
88 #define empty_pt_map_p(s) set_empty_p(points_to_graph_set(s))
89 //#define consistent_pt_map_p(s) consistent_points_to_set(points_to_graph_set(s))
90 #define consistent_pt_map_p(s) consistent_points_to_graph_p(s)
91 // FI: Not so sure we do not need a new name
92 #define source_in_pt_map_p(cell,set) source_in_set_p(cell,points_to_graph_set(set))
93 // Returns pt_map s after update via side-effect
94 #define add_arc_to_pt_map(a, s) (set_add_element((set) points_to_graph_set(s), (set) points_to_graph_set(s), (void *) a), (s))
95 #define add_arc_to_simple_pt_map(a, s) set_add_element((set) s, (set) s, (void *) a)
96 
97 // FI: useful to have a function for debugging
98 #define remove_arc_from_pt_map(a, s) (set_del_element((set) points_to_graph_set(s), (set) points_to_graph_set(s), (void *) a), (s))
99 #define remove_arc_from_simple_pt_map(a, s) set_del_element((set) s, (set) s, (void *) a)
100 
101 // A reminder:
102 // full_copy_pt_map(pt_map m)
103 #endif
104 /* cproto-generated files */
105 /* alias_pairs.c */
106 extern bool in_alias_pairs(const string /*module_name*/);
107 extern bool out_alias_pairs(const char */*module_name*/);
108 /* alias_lists.c */
109 extern bool alias_lists(const string /*module_name*/);
110 /* alias_classes.c */
111 extern bool alias_classes(const char */*module_name*/);
112 /* prettyprint.c */
113 extern bool print_in_alias_pairs(const char */*module_name*/);
114 extern bool print_out_alias_pairs(const char */*module_name*/);
115 extern bool print_alias_lists(const char */*module_name*/);
116 extern bool print_alias_classes(const char */*module_name*/);
117 #endif /* alias_classes_header_included */
bool alias_classes(const char *)
alias_classes.c
bool in_alias_pairs(const string)
cproto-generated files
Definition: alias_pairs.c:587
points_to_graph pt_map
Definition: alias-classes.h:67
bool print_in_alias_pairs(const char *)
prettyprint.c
Definition: prettyprint.c:273
bool alias_lists(const string)
alias_lists.c
Definition: alias_lists.c:328
bool print_alias_lists(const char *)
Definition: prettyprint.c:304
bool print_alias_classes(const char *)
Definition: prettyprint.c:319
bool out_alias_pairs(const char *)
top-level creation of pairs of aliases of OUT regions of the module modifies global vars callee,...
Definition: alias_pairs.c:623
bool print_out_alias_pairs(const char *)
Definition: prettyprint.c:289
FI: I do not understand why the type is duplicated at the set level.
Definition: set.c:59