29.01.2015 Views

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

222 Chapter 17<br />

(all loop nest iterations where splitting-if is false divi<strong>de</strong>d by all loop<br />

iterations located in the else-part)<br />

The computation of is that complex because the duplication of the<br />

innermost loop in the then-part of the splitting-if (e.g. the y loop in Figure<br />

17-2) has to be consi<strong>de</strong>red. Since does not <strong>de</strong>pend linearly on a<br />

mo<strong>de</strong>ling of the optimization problem using integer linear programming (ILP)<br />

is impossible, so that we chose to use a GA.<br />

Example: For a condition C = 4*x+k+i-40>=0 and the loop nest of Figure<br />

17-1, our GA can generate the individual I = (10, 0, 0). The numbers<br />

enco<strong>de</strong>d in I <strong>de</strong>note the values and so that the following<br />

intervals are <strong>de</strong>fined:<br />

Since only variable<br />

x is constrained by I, the x-loop would be split using the condition x>=10.<br />

The <strong>for</strong>mulas above imply a total execution of 12,701,020 if -statements<br />

3.3. Global search space construction<br />

After the execution of the first GA, a set of if-statements<br />

consisting of affine conditions and their<br />

associated optimized polytopes are given. For <strong>de</strong>termining in<strong>de</strong>x variable<br />

values where all if-statements in a program are satisfied, a polytope G<br />

mo<strong>de</strong>ling the global search space has to be created out of all<br />

In a first step, a polytope is built <strong>for</strong> every if-statement In or<strong>de</strong>r to<br />

reach this goal, the conditions of are traversed in their natural execution<br />

or<strong>de</strong>r which is <strong>de</strong>fined by the prece<strong>de</strong>nce rules of the operators && and ||.<br />

is initialized with While traversing the conditions of if-statement i,<br />

and are connected either with the intersection or union operators <strong>for</strong><br />

polytopes:<br />

with<br />

mo<strong>de</strong>ls those ranges of the in<strong>de</strong>x variables where one if-statement is<br />

satisfied. Since all if -statements need to be satisfied, the global search space<br />

G is built by intersecting all<br />

Since polyhedra are not closed un<strong>de</strong>r<br />

the union operator, the <strong>de</strong>fined above are no real polytopes. Instead, we use<br />

finite unions of polytopes <strong>for</strong> which the union and intersection operators are<br />

closed [23].

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!