Skip to content

Killflow bug #8

@yebinchon

Description

@yebinchon

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions