-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
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;
}Metadata
Metadata
Assignees
Labels
No labels