
122 Energy-Aware Memory Management for EMSs
Definition 4.5 (dependence) Let S1 and S2 be two statement instances
of a program. There is a dependence from S1 to S2 if:
r
S1 is executed before S2;
r
S1 and S2 access the same resource, and at least one of the statements
modifies the resource;
r
there is no statement executed between S1 and S2 that modifies the
resource.
Notice that there is no dependence if both statements read the same resource:
reading the same data twice can be done in any particular order. However,
this kind of input “dependence” can be used by the compiler to make some
optimizations (in particular cache optimizations).
If S1 modifies data