[PATCH] D109527: [Delinearization] Delinearization of Array-of-Struct. Proof-of-Concept.

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 15:32:07 PDT 2021


bmahjour added inline comments.


================
Comment at: llvm/test/Analysis/Delinearization/array_of_struct.ll:1
+; RUN: opt < %s -analyze -enable-new-pm=0 -delinearize | FileCheck %s
+; RUN: opt < %s -passes='print<delinearization>' -disable-output 2>&1 | FileCheck %s
----------------
Could we add the following as a motivating test case as well:

```
struct __attribute__((packed)) MyS {
  float a;
  double b;
  char c;
};

void foo(long long n, long long m, struct MyS f1[][n][m]) {
  for (int i = 0; i < 1024; i++)
    for (int j = 0; j < n; j++)
      for (int k = 0; k < m; k++)
        f1[i][j][k].b = f1[i-1][j][k].b;
}
```

The expected delinearization would produce the same subscripts in every dimension (including the added inner-most byte dimension) except for the outer-most dimension where the absolute difference between the subscripts should be 1.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109527/new/

https://reviews.llvm.org/D109527



More information about the llvm-commits mailing list