SCAF
SCAF copied to clipboard
Killflow bug
Killflow removes all loop-carried dependences where the store happens before the load. It considers the store to have killed itself.
int *data;
int main(int argc, char **argv) {
unsigned iter;
unsigned len;
unsigned freq;
if (argc == 4) {
iter = atoi(argv[1]);
len = atoi(argv[2]);
freq = atoi(argv[3]);
} else {
printf("Need three arguments: iter, len, freq\n");
}
data = (int *)malloc(sizeof(int) * len);
auto sum = 0;
for (auto i = 0; i < len-1; i++) {
data[i+freq] = i%15;
sum += data[i];
}
printf("%d", sum);
free(data);
return 0;
}
Bugs related to this example:
- Noelle bug: no LC dep from A to B is A dom B
- KillFlow bug: fixed
- GlobalMalloc bug: triggered if the file is a C file.
NOELLE bug and killflow bug fixed in master. GlobalMalloc bug pending.