1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
--- a/petit/include/petit/Zima.h
+++ b/petit/include/petit/Zima.h
@@ -67,13 +67,13 @@ public:
// If already_done != NULL, stop adding constraints when we get there
friend void access_in_bounds(F_And *N, const AccessIteration &AI,
- context_iterator already_done = 0,
- bool assertions = true);
+ context_iterator already_done,
+ bool assertions);
friend void context_in_bounds(F_And *N, const AccessIteration &AI,
context_iterator c,
- context_iterator already_done = 0,
- bool assertions = true);
+ context_iterator already_done,
+ bool assertions);
//
// For A[I] and B[J] to access the same memory location,
@@ -86,7 +86,7 @@ public:
//
friend void access_same_memory(F_And *N, const AccessIteration &AI,
const AccessIteration &BJ);
-
+
friend void subscripts_equal_to_tuple (F_And *N, const AccessIteration &AI,
const Variable_ID_Tuple *t);
--- a/petit/src/add-assert.c
+++ b/petit/src/add-assert.c
@@ -110,11 +110,11 @@ build_zap_problem(dd_current dd, Relation *r)
context_iterator c = cont_i_for_access(src.access());
while (!cont_i_done(c) && !cont_i_cur_is_loop(c)) cont_i_next(c);
- if (!cont_i_done(c)) context_in_bounds(le, src, c);
+ if (!cont_i_done(c)) context_in_bounds(le, src, c, 0, true);
c = cont_i_for_access(dest.access());
while (!cont_i_done(c) && !cont_i_cur_is_loop(c)) cont_i_next(c);
- if (!cont_i_done(c)) context_in_bounds(le, dest, c);
+ if (!cont_i_done(c)) context_in_bounds(le, dest, c, 0, true);
assert(copy(loops_execute).is_upper_bound_satisfiable());
--- a/petit/src/browsedd.c
+++ b/petit/src/browsedd.c
@@ -637,8 +637,8 @@ void write_deps(char *filename , char *inputfile,
F_And *f = it.add_and();
- access_in_bounds(f, a);
- access_in_bounds(f, b);
+ access_in_bounds(f, a, 0, true);
+ access_in_bounds(f, b, 0, true);
it.finalize();
it = Intersection(it,
--- a/petit/src/build_stmt_rel.c
+++ b/petit/src/build_stmt_rel.c
@@ -197,7 +197,7 @@ static Relation buildBoundsSet(int stmt)
F_And *f = it.add_and();
- access_in_bounds(f, a1);
+ access_in_bounds(f, a1, 0, true);
it.finalize();
it.simplify(1,1);
return it;
@@ -218,8 +218,8 @@ static Relation getBoundsRelation(int stmt1, int stmt2)
// unify_symbolic_constants(f, a1, a2, 0);
- access_in_bounds(f, a1);
- access_in_bounds(f, a2);
+ access_in_bounds(f, a1, 0, true);
+ access_in_bounds(f, a2, 0, true);
it.finalize();
it.simplify(1,1);
return it;
--- a/petit/src/ddomega.c
+++ b/petit/src/ddomega.c
@@ -109,8 +109,8 @@ static Relation memory_dependence_relation(a_access access1, a_access access2)
F_And *f = it.add_and();
- access_in_bounds(f, a);
- access_in_bounds(f, b);
+ access_in_bounds(f, a, 0, true);
+ access_in_bounds(f, b, 0, true);
access_same_memory(f, a, b);
it.finalize();
@@ -181,7 +181,7 @@ void dd_omega_test(a_access access1, a_access access2,
if (access1!=Entry) {
assert (access2 == ExitNode);
AccessIteration a(access1,simple_rel, Input_Tuple);
- access_in_bounds(f,a);
+ access_in_bounds(f,a,0,true);
subscripts_equal_to_tuple(f, a, &output_vars);
}
@@ -189,7 +189,7 @@ void dd_omega_test(a_access access1, a_access access2,
if (access2!=ExitNode) {
assert (access1 == Entry);
AccessIteration b(access2,simple_rel, Output_Tuple);
- access_in_bounds(f, b);
+ access_in_bounds(f, b, 0, true);
subscripts_equal_to_tuple(f, b, &input_vars);
}
--- a/petit/src/hpp.c
+++ b/petit/src/hpp.c
@@ -139,7 +139,7 @@ Relation get_is(node *n) {
Relation R(node_depth(a));
AccessIteration ai(a, &R, Input_Tuple);
F_And *f = R.add_and();
- access_in_bounds(f, ai);
+ access_in_bounds(f, ai, 0, true);
R.finalize();
return R;
}
--- a/petit/src/kill.c
+++ b/petit/src/kill.c
@@ -146,7 +146,7 @@ static Relation build_initial_exposed(a_access access1)
F_And *f = it.add_and();
- access_in_bounds(f,a);
+ access_in_bounds(f,a,0,true);
it.finalize();
return it;
@@ -298,7 +298,7 @@ static change do_simple_kill(Relation &value_deps,
already_done = access_inner_shared_context_at_depth(B, A, C, lzo);
}
- access_in_bounds(fkf, bj2, already_done);
+ access_in_bounds(fkf, bj2, already_done, true);
access_same_memory(fkf, bj2, ck);
connected_by_diff(fkf, bj2, ck, killer_flow);
kf.finalize();
|