[polly] [Polly] Materialize escaping scalars from empty-domain statements as poison (PR #220008)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 03:52:07 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- polly/lib/Analysis/ScopBuilder.cpp polly/lib/Analysis/ScopInfo.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/polly/lib/Analysis/ScopBuilder.cpp b/polly/lib/Analysis/ScopBuilder.cpp
index aced43a75..5f8c6dc8c 100644
--- a/polly/lib/Analysis/ScopBuilder.cpp
+++ b/polly/lib/Analysis/ScopBuilder.cpp
@@ -1338,7 +1338,7 @@ void ScopBuilder::buildEscapingDependences(Instruction *Inst) {
// functions that depend only on it are moved before/above
// buildAccessFunctions(), since domain calculation and determining the
// MAs of an instruction are logically unrelated.
- if (scop->isEscaping(Inst))
+ if (scop->isEscaping(Inst))
ensureValueWrite(Inst);
}
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 614788cbd..88d445fda 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -1689,13 +1689,13 @@ void Scop::removeStmtNotInDomainMap() {
if (!Domain.is_null() && !Domain.is_empty())
return false;
- // This ScopStmt is being removed. For all the MAs belonging to this ScopStmt
- // if it is 1) a scalar (MemoryKind::Value) 2) escaping 3) a must-write access
- // 4) empty domain ScopStmt, must therefore be preserved via SAI registration.
- // This allows code generation to create the required merge PHIs and
- // repair use sites after versioning has pruned the defining statement
- // from optimized copy (due to its null/empty domain). Without this, Polly
- // may generate invalid IR with broken dominance.
+ // This ScopStmt is being removed. For all the MAs belonging to this
+ // ScopStmt if it is 1) a scalar (MemoryKind::Value) 2) escaping 3) a
+ // must-write access 4) empty domain ScopStmt, must therefore be preserved
+ // via SAI registration. This allows code generation to create the required
+ // merge PHIs and repair use sites after versioning has pruned the defining
+ // statement from optimized copy (due to its null/empty domain). Without
+ // this, Polly may generate invalid IR with broken dominance.
for (MemoryAccess *MA : Stmt) {
if (!MA->isMustWrite() || !MA->isOriginalValueKind())
continue;
``````````
</details>
https://github.com/llvm/llvm-project/pull/220008
More information about the llvm-commits
mailing list