[llvm] [llvm] Use computeConstantRange to improve llvm.objectsize computation (PR #115522)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 09:43:40 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 d74127e78aa7f8ab07b0926d25920444dde6c73c 30b169b676c14e6975cb2e0a34093aab8d2cc309 --extensions h,cpp -- llvm/include/llvm/Analysis/MemoryBuiltins.h llvm/include/llvm/IR/Value.h llvm/lib/Analysis/MemoryBuiltins.cpp llvm/lib/Transforms/InstCombine/InstructionCombining.cpp llvm/lib/Transforms/Scalar/LowerConstantIntrinsics.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp
index 035285895b..1c136e76e7 100644
--- a/llvm/lib/Analysis/MemoryBuiltins.cpp
+++ b/llvm/lib/Analysis/MemoryBuiltins.cpp
@@ -731,7 +731,7 @@ OffsetSpan ObjectSizeOffsetVisitor::computeImpl(Value *V) {
// Give it another try with approximated analysis. We don't start with this
// one because stripAndAccumulateConstantOffsets behaves differently wrt.
// overflows if we provide an external Analysis.
- if(isa<GetElementPtrInst>(V)) {
+ if (isa<GetElementPtrInst>(V)) {
// External Analysis used to compute the Min/Max value of individual Offsets
// within a GEP.
auto OffsetRangeAnalysis = [this, V](Value &VOffset, APInt &Offset) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/115522
More information about the llvm-commits
mailing list