[flang-commits] [flang] WIP: [flang] AliasAnalysis: Fix pointer component logic (PR #94242)

via flang-commits flang-commits at lists.llvm.org
Mon Jun 3 09:26:44 PDT 2024


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 530d4c9bf3d963f51375a1d7afb32f439d9c94a9 9f6d2a7add52dcd3fe51d7376be91b1f3e9b7646 -- flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp b/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
index 9d6640bf18..6cacefec60 100644
--- a/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+++ b/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
@@ -142,8 +142,10 @@ AliasResult AliasAnalysis::alias(Value lhs, Value rhs) {
       return AliasResult::MustAlias;
     }
     if (lhsSrc.origin.u == rhsSrc.origin.u &&
-        ((lhsSrc.approximateSource && !lhsSrc.isData() && !rhsSrc.approximateSource) ||
-         (rhsSrc.approximateSource && !rhsSrc.isData() && !lhsSrc.approximateSource))) {
+        ((lhsSrc.approximateSource && !lhsSrc.isData() &&
+          !rhsSrc.approximateSource) ||
+         (rhsSrc.approximateSource && !rhsSrc.isData() &&
+          !lhsSrc.approximateSource))) {
       LLVM_DEBUG(llvm::dbgs()
                  << "  aliasing between composite and non-data component\n");
       return AliasResult::MayAlias;

``````````

</details>


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


More information about the flang-commits mailing list