PIPS
alias-classes-local.h
Go to the documentation of this file.
1
/*
2
3
$Id: alias-classes-local.h 23065 2016-03-02 09:05:50Z coelho $
4
5
Copyright 1989-2016 MINES ParisTech
6
7
This file is part of PIPS.
8
9
PIPS is free software: you can redistribute it and/or modify it
10
under the terms of the GNU General Public License as published by
11
the Free Software Foundation, either version 3 of the License, or
12
any later version.
13
14
PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15
WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
FITNESS FOR A PARTICULAR PURPOSE.
17
18
See the GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22
23
*/
24
#include "
points_to_private.h
"
25
#include "
effects.h
"
26
#define SEQUENTIAL_POINTS_TO_SETS_SUFFIX ".pt"
27
#define USER_POINTS_TO_SETS_SUFFIX ".upt"
28
29
// FI: just in case another data structure would be more suitable or
30
// more efficient
31
// For instance, set of points-to could be a type declared in
32
// points_to_private.tex
33
#if 0
34
typedef
set
pt_map
;
35
#define pt_map_undefined set_undefined
36
#define pt_map_undefined_p(pt) ((pt)==set_undefined)
37
#define new_pt_map() set_generic_make(set_private, points_to_equal_p, points_to_rank)
38
#define assign_pt_map(x,y) set_assign(x, y)
39
#define clear_pt_map(pt) set_clear(pt)
40
#define free_pt_map(pt) set_free(pt)
41
#define print_pt_map(pt) print_points_to_set(""
,pt);
42
// FI: varargs; probably OK with gcc preprocessor
43
#define free_pt_maps sets_free
44
#define union_of_pt_maps(pt1, pt2, pt3) set_union(pt1, pt2, pt3)
45
#define difference_of_pt_maps(pt1, pt2, pt3) set_difference(pt1, pt2, pt3)
46
47
#define empty_pt_map_p(s) set_empty_p(s)
48
#define consistent_pt_map_p(s) consistent_points_to_set(s)
49
// FI: Not so sure we do not need a new name
50
#define source_in_pt_map_p(cell,set) source_in_set_p(cell,set)
51
#define add_arc_to_pt_map(a, s) set_add_element((set) s, (set) s, (void *) a)
52
53
// FI: useful to have a function for debugging
54
#define remove_arc_from_pt_map(a, s) set_del_element((set) s, (set) s, (void *) a)
55
56
// A reminder:
57
// full_copy_pt_map(pt_map m)
58
#else
59
typedef
points_to_graph
pt_map
;
60
#define pt_map_undefined points_to_graph_undefined
61
#define pt_map_undefined_p(pt) ((pt)==points_to_graph_undefined)
62
#define new_pt_map() make_points_to_graph(false, set_generic_make(set_private, points_to_equal_p, points_to_rank))
63
#define new_simple_pt_map() set_generic_make(set_private, points_to_equal_p, points_to_rank)
64
#define assign_pt_map(x,y) ((void) set_assign(points_to_graph_set(x), points_to_graph_set(y)), (x))
65
#define clear_pt_map(pt) set_clear(points_to_graph_set(pt))
66
// FI: free_set() is a shallow free, free_points_to_graph() is a deep free
67
#define free_pt_map(pt) free_points_to_graph(pt)
68
#define print_pt_map(pt) print_points_to_set(""
, points_to_graph_set(pt));
69
// FI: varargs; probably OK with gcc preprocessor
70
#define free_pt_maps free_points_to_graph_sets
71
72
#define union_of_pt_maps(pt1, pt2, pt3) set_union(points_to_graph_set(pt1), \
73
points_to_graph_set(pt2), \
74
points_to_graph_set(pt3))
75
#define difference_of_pt_maps(pt1, pt2, pt3) \
76
set_difference(points_to_graph_set(pt1), \
77
points_to_graph_set(pt2), \
78
points_to_graph_set(pt3))
79
80
#define empty_pt_map_p(s) set_empty_p(points_to_graph_set(s))
81
//#define consistent_pt_map_p(s) consistent_points_to_set(points_to_graph_set(s))
82
#define consistent_pt_map_p(s) consistent_points_to_graph_p(s)
83
// FI: Not so sure we do not need a new name
84
#define source_in_pt_map_p(cell,set) source_in_set_p(cell,points_to_graph_set(set))
85
// Returns pt_map s after update via side-effect
86
#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))
87
#define add_arc_to_simple_pt_map(a, s) set_add_element((set) s, (set) s, (void *) a)
88
89
// FI: useful to have a function for debugging
90
#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))
91
#define remove_arc_from_simple_pt_map(a, s) set_del_element((set) s, (set) s, (void *) a)
92
93
// A reminder:
94
// full_copy_pt_map(pt_map m)
95
#endif
pt_map
points_to_graph pt_map
Definition:
alias-classes-local.h:59
effects.h
points_to_private.h
_newgen_struct_points_to_graph_
Definition:
points_to_private.h:94
_set_chunk
FI: I do not understand why the type is duplicated at the set level.
Definition:
set.c:59
pips
src
Libs
alias-classes
alias-classes-local.h
Generated on Thu Sep 26 2024 22:11:32 for PIPS by
1.9.1