[polly] [polly] Add profitability check for expanded region. (PR #96548)

Huihui Zhang via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 16:22:08 PDT 2024


================
@@ -0,0 +1,138 @@
+; RUN: opt -polly-use-llvm-names -polly-region-expansion-profitability-check=1 \
+; RUN: "-passes=scop(polly-opt-isl,print<polly-ast>)" -disable-output < %s | \
+; RUN: FileCheck %s --check-prefix=HEURISTIC
+; RUN: opt -polly-region-expansion-profitability-check=0 -passes=polly-codegen \
+; RUN: -pass-remarks-analysis="polly-scops" -disable-output < %s 2>&1 | \
+; RUN: FileCheck %s --check-prefix=NO_HEURISTIC
+
+; void test(int **restrict a, int *restrict b, int *restrict c,
+;           int *restrict d, int *restrict e, int *restrict f,
+;	    int L, int M, int Val0) {
+;   for (int i = 1; i <= L; i++) { // L1
----------------
huihzhang wrote:

I have simplified this test, `Loop i` and `Val0` are removed in the update.
I do need to keep `a` as multi-dimensional, as basePtr a[0] helps hit a scop invalidation on INVARIANTLOAD. And the scop is rejected unnecessarily.

https://github.com/llvm/llvm-project/pull/96548


More information about the llvm-commits mailing list