[llvm] [Analysis] Teach ScalarEvolution::getRangeRef about more dereferenceable objects (PR #104778)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 06:43:20 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 816068e462888f31f4bcf71f2f728eb77ff2ea15 aaec1d040ce48b0eab45678629200fc2f4f0499b --extensions cpp -- llvm/lib/Analysis/ScalarEvolution.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 88a201725f..e1a91e813f 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -6859,7 +6859,8 @@ const ConstantRange &ScalarEvolution::getRangeRef(
       Opts.RoundToAlign = false;
       Opts.NullIsUnknownSize = true;
       bool CanBeNull, CanBeFreed;
-      uint64_t ObjSize = V->getPointerDereferenceableBytes(DL, CanBeNull, CanBeFreed);
+      uint64_t ObjSize =
+          V->getPointerDereferenceableBytes(DL, CanBeNull, CanBeFreed);
       if (ObjSize > 1) {
         // The highest address the object can start is ObjSize bytes before the
         // end (unsigned max value). If this value is not a multiple of the

``````````

</details>


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


More information about the llvm-commits mailing list