[polly] [polly] Add profitability check for expanded region. (PR #96548)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 06:28:33 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
----------------
Meinersbur wrote:
Is it possible to simplify this? For instance:
1. The loop `i` is not part of the SCoP in either case. Could be made a a function parameter.
2. `a` doesn't need to be multi-dimensional
3. `Val0` does not need to be a function parameter
https://github.com/llvm/llvm-project/pull/96548
More information about the llvm-commits
mailing list