[llvm] [BasicAA] Make isNotCapturedBeforeOrAt() check for calls more precise (PR #69931)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 07:55:07 PDT 2023
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 600e38b11ae79b0c0cd10416b2a7a78f654cf5b2 9ad5d52e8f4d244e07b8529a69a11439c14f7d7f -- llvm/include/llvm/Analysis/AliasAnalysis.h llvm/lib/Analysis/BasicAliasAnalysis.cpp
``````````
</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 82289292a..d8e82062a 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -195,8 +195,7 @@ static bool isObjectSize(const Value *V, uint64_t Size, const DataLayout &DL,
CaptureInfo::~CaptureInfo() = default;
bool SimpleCaptureInfo::isNotCapturedBefore(const Value *Object,
- const Instruction *I,
- bool OrAt) {
+ const Instruction *I, bool OrAt) {
return isNonEscapingLocalObject(Object, &IsCapturedCache);
}
@@ -209,8 +208,7 @@ static bool isNotInCycle(const Instruction *I, const DominatorTree &DT,
}
bool EarliestEscapeInfo::isNotCapturedBefore(const Value *Object,
- const Instruction *I,
- bool OrAt) {
+ const Instruction *I, bool OrAt) {
if (!isIdentifiedFunctionLocal(Object))
return false;
@@ -1519,10 +1517,10 @@ AliasResult BasicAAResult::aliasCheck(const Value *V1, LocationSize V1Size,
// location if that memory location doesn't escape. Or it may pass a
// nocapture value to other functions as long as they don't capture it.
if (isEscapeSource(O1) &&
- AAQI.CI->isNotCapturedBefore(O2, cast<Instruction>(O1), /*OrAt*/true))
+ AAQI.CI->isNotCapturedBefore(O2, cast<Instruction>(O1), /*OrAt*/ true))
return AliasResult::NoAlias;
if (isEscapeSource(O2) &&
- AAQI.CI->isNotCapturedBefore(O1, cast<Instruction>(O2), /*OrAt*/true))
+ AAQI.CI->isNotCapturedBefore(O1, cast<Instruction>(O2), /*OrAt*/ true))
return AliasResult::NoAlias;
}
@@ -1715,7 +1713,7 @@ bool BasicAAResult::isValueEqualInPotentialCycles(const Value *V,
if (!Inst || Inst->getParent()->isEntryBlock())
return true;
- return isNotInCycle(Inst, *DT, /*LI*/nullptr);
+ return isNotInCycle(Inst, *DT, /*LI*/ nullptr);
}
/// Computes the symbolic difference between two de-composed GEPs.
``````````
</details>
https://github.com/llvm/llvm-project/pull/69931
More information about the llvm-commits
mailing list