SCAF icon indicating copy to clipboard operation
SCAF copied to clipboard

Killflow bug

Open yebinchon opened this issue 3 years ago • 2 comments

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;
}

yebinchon avatar Nov 16 '22 21:11 yebinchon

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.

vgene avatar Nov 19 '22 20:11 vgene

NOELLE bug and killflow bug fixed in master. GlobalMalloc bug pending.

vgene avatar Dec 19 '22 18:12 vgene