[flang-commits] [flang] [flang] AliasAnalysis: distinguish addr of arg vs. addr in arg (PR #87723)

via flang-commits flang-commits at lists.llvm.org
Thu Apr 4 15:34:11 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 13be0d4a34c421607a5c082ec39dad2cbd6d506f 91def8cd94aadf6f1909c63277aea4364c8907e1 -- flang/include/flang/Optimizer/Analysis/AliasAnalysis.h 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 f0af0dd547..cfb80e6bb8 100644
--- a/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+++ b/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
@@ -88,18 +88,23 @@ AliasResult AliasAnalysis::alias(Value lhs, Value rhs) {
   auto lhsSrc = getSource(lhs);
   auto rhsSrc = getSource(rhs);
   bool approximateSource = lhsSrc.approximateSource || rhsSrc.approximateSource;
-  LLVM_DEBUG(llvm::dbgs() << "AliasAnalysis::alias\n";
-             llvm::dbgs() << "  lhs: " << lhs << "\n";
-             llvm::dbgs() << "  lhsSrc: " << lhsSrc << "\n";
-             llvm::dbgs() << "  lhsSrc kind: " << EnumToString(lhsSrc.kind) << "\n";
-             llvm::dbgs() << "  lhsSrc pointer: " << lhsSrc.attributes.test(Attribute::Pointer) << "\n";
-             llvm::dbgs() << "  lhsSrc target: " << lhsSrc.attributes.test(Attribute::Target) << "\n";
-             llvm::dbgs() << "  rhs: " << rhs << "\n";
-             llvm::dbgs() << "  rhsSrc: " << rhsSrc << "\n";
-             llvm::dbgs() << "  rhsSrc kind: " << EnumToString(rhsSrc.kind) << "\n";
-             llvm::dbgs() << "  rhsSrc pointer: " << rhsSrc.attributes.test(Attribute::Pointer) << "\n";
-             llvm::dbgs() << "  rhsSrc target: " << rhsSrc.attributes.test(Attribute::Target) << "\n";
-             llvm::dbgs() << "\n";);
+  LLVM_DEBUG(
+      llvm::dbgs() << "AliasAnalysis::alias\n";
+      llvm::dbgs() << "  lhs: " << lhs << "\n";
+      llvm::dbgs() << "  lhsSrc: " << lhsSrc << "\n";
+      llvm::dbgs() << "  lhsSrc kind: " << EnumToString(lhsSrc.kind) << "\n";
+      llvm::dbgs() << "  lhsSrc pointer: "
+                   << lhsSrc.attributes.test(Attribute::Pointer) << "\n";
+      llvm::dbgs() << "  lhsSrc target: "
+                   << lhsSrc.attributes.test(Attribute::Target) << "\n";
+      llvm::dbgs() << "  rhs: " << rhs << "\n";
+      llvm::dbgs() << "  rhsSrc: " << rhsSrc << "\n";
+      llvm::dbgs() << "  rhsSrc kind: " << EnumToString(rhsSrc.kind) << "\n";
+      llvm::dbgs() << "  rhsSrc pointer: "
+                   << rhsSrc.attributes.test(Attribute::Pointer) << "\n";
+      llvm::dbgs() << "  rhsSrc target: "
+                   << rhsSrc.attributes.test(Attribute::Target) << "\n";
+      llvm::dbgs() << "\n";);
 
   // Indirect case currently not handled. Conservatively assume
   // it aliases with everything

``````````

</details>


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


More information about the flang-commits mailing list