[llvm] [TBAA] Extract logic to use TBAA tag for field of !tbaa.struct (NFC). (PR #81284)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 09:56:54 PST 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 2884d048396abc82c8356c4e350ef968fb24a0d7 e6de9f21b162c57dd09cb4de3147b7ab09ef8681 -- llvm/include/llvm/IR/Metadata.h llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp b/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
index edc08cde68..d05f42552e 100644
--- a/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
@@ -826,7 +826,8 @@ AAMDNodes AAMDNodes::adjustForAccess(unsigned AccessSize) {
       mdconst::hasa<ConstantInt>(M->getOperand(0)) &&
       mdconst::extract<ConstantInt>(M->getOperand(0))->isZero() &&
       M->getOperand(1) && mdconst::hasa<ConstantInt>(M->getOperand(1)) &&
-      mdconst::extract<ConstantInt>(M->getOperand(1))->getValue() == AccessSize &&
+      mdconst::extract<ConstantInt>(M->getOperand(1))->getValue() ==
+          AccessSize &&
       M->getOperand(2) && isa<MDNode>(M->getOperand(2)))
     New.TBAA = cast<MDNode>(M->getOperand(2));
   return New;

``````````

</details>


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


More information about the llvm-commits mailing list