[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:36 PDT 2024
================
@@ -0,0 +1,70 @@
+; RUN: opt -polly-use-llvm-names -polly-region-expansion-profitability-check=1 \
+; RUN: -polly-loopfusion-greedy=1 "-passes=scop(polly-opt-isl,print<polly-ast>)" \
+; RUN: -disable-output < %s | FileCheck %s
+
+; void foo(int *A, int *B, int *C, int n, int *U) {
+; for (int i = 0; i < 1024; ++i) // L1
+; B[i] += A[i];
+;
+; if (*U != 1) // Blocks with unrelated memory accesses.
+; *U+=42;
+;
+; for (int j = 0; j < 1024; ++j) // L2
+; C[j] += B[j];
+; }
+
+define void @foo(ptr nocapture noundef readonly %A, ptr nocapture noundef %B, ptr nocapture noundef %C, i32 noundef %n, ptr nocapture noundef %U) {
+entry:
+ br label %entry.split
+
+entry.split: ; preds = %entry
+ br label %for.body
----------------
Meinersbur wrote:
Consider sorting the BBs by execution order
https://github.com/llvm/llvm-project/pull/96548
More information about the llvm-commits
mailing list