[llvm] [BasicAA] Compute minimal access extents lazily (PR #226931)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 02:39:46 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 -- llvm/lib/Analysis/BasicAliasAnalysis.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/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index 462f69d3a..52a46a3fe 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -122,12 +122,10 @@ static std::optional<TypeSize> getObjectSize(const Value *V,
/// parameter.
static TypeSize getMinimalExtentFrom(const Value &V,
const LocationSize &LocSize,
- const DataLayout &DL,
- bool NullIsValidLoc);
+ const DataLayout &DL, bool NullIsValidLoc);
static bool isObjectSmallerThan(const Value *V, const Value &OtherV,
- LocationSize OtherSize,
- const DataLayout &DL,
+ LocationSize OtherSize, const DataLayout &DL,
const TargetLibraryInfo &TLI,
bool NullIsValidLoc) {
// Note that the meanings of the "object" are slightly different in the
@@ -153,8 +151,7 @@ static bool isObjectSmallerThan(const Value *V, const Value &OtherV,
if (!isIdentifiedObject(V))
return false;
- TypeSize Size =
- getMinimalExtentFrom(OtherV, OtherSize, DL, NullIsValidLoc);
+ TypeSize Size = getMinimalExtentFrom(OtherV, OtherSize, DL, NullIsValidLoc);
// This function needs to use the aligned object size because we allow
// reads a bit past the end given sufficient alignment.
``````````
</details>
https://github.com/llvm/llvm-project/pull/226931
More information about the llvm-commits
mailing list