WLS to aggressive / does not handle extrema
|
|
Bugzilla Link |
686 |
Created on |
Mar 23, 2010 11:20 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Attachments |
tvd2d.sac |
Extended Description
with {
( lb <= [i] < ub ) {
ans = with {
( lb2 <= [j] < ub2) {
array = lotsOfWork( i, j);
} : array;
}
res = with {
( lb2 <= [j] < ub2) : ans[j]+1;
}
} : res;
}
Is currently be "optimised" to:
with {
( lb++lb2 <= [i,j] < ub++ub2 ) {
ans = with {
( lb2 <= [j] < ub2) {
array = lotsOfWork( i, j);
} : array;
}
res = ans[j]+1;
} : res;
}
The problem stems from code that was added to skip extrema, however this code skips ANY THING. This makes WLS behave more aggressive than it should.
SBS and CAJ have changed the code so that it is no longer aggressive however are chain means that extrema are no longer tolerated when performing wls.
It should be sufficient to implement the function skipIrrelevantAssigns. This function should skip over any assign that at runtime results in no execution time and there for can be run any number of (extra) times without increasing run time. As extrema are removed before run time they can be included in the skipped items as they take no time to run (as they will not exist at run time).