[llvm] f3bd221 - [NFC] clang-format attributor related files
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 9 19:38:12 PDT 2023
Author: Shilei Tian
Date: 2023-07-09T22:37:30-04:00
New Revision: f3bd221adc2f08d968ad500ec98d44d423847e21
URL: https://github.com/llvm/llvm-project/commit/f3bd221adc2f08d968ad500ec98d44d423847e21
DIFF: https://github.com/llvm/llvm-project/commit/f3bd221adc2f08d968ad500ec98d44d423847e21.diff
LOG: [NFC] clang-format attributor related files
Added:
Modified:
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index 88ea0fd4c69ba1..834a8b0922d584 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -1125,7 +1125,8 @@ struct AnalysisGetter {
// allow partial specialization, which is needed in this case. So instead, we
// use a constexpr bool to perform the SFINAE, and then use this information
// inside the function template.
- template <typename, typename = void> static constexpr bool HasLegacyWrapper = false;
+ template <typename, typename = void>
+ static constexpr bool HasLegacyWrapper = false;
template <typename Analysis>
typename Analysis::Result *getAnalysis(const Function &F,
@@ -1168,7 +1169,7 @@ struct AnalysisGetter {
template <typename Analysis>
constexpr bool AnalysisGetter::HasLegacyWrapper<
- Analysis, std::void_t<typename Analysis::LegacyWrapper>> = true;
+ Analysis, std::void_t<typename Analysis::LegacyWrapper>> = true;
/// Data structure to hold cached (LLVM-IR) information.
///
@@ -5523,7 +5524,8 @@ struct AANonConvergent : public StateWrapper<BooleanState, AbstractAttribute> {
AANonConvergent(const IRPosition &IRP, Attributor &A) : Base(IRP) {}
/// Create an abstract attribute view for the position \p IRP.
- static AANonConvergent &createForPosition(const IRPosition &IRP, Attributor &A);
+ static AANonConvergent &createForPosition(const IRPosition &IRP,
+ Attributor &A);
/// Return true if "non-convergent" is assumed.
bool isAssumedNotConvergent() const { return getAssumed(); }
@@ -5537,7 +5539,8 @@ struct AANonConvergent : public StateWrapper<BooleanState, AbstractAttribute> {
/// See AbstractAttribute::getIdAddr()
const char *getIdAddr() const override { return &ID; }
- /// This function should return true if the type of the \p AA is AANonConvergent.
+ /// This function should return true if the type of the \p AA is
+ /// AANonConvergent.
static bool classof(const AbstractAttribute *AA) {
return (AA->getIdAddr() == &ID);
}
diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index 77539632c6a804..6030e7f0d8b619 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -957,10 +957,8 @@ ChangeStatus AA::PointerInfo::State::addAccess(
}
auto AddToBins = [&](const AAPointerInfo::RangeList &ToAdd) {
- LLVM_DEBUG(
- if (ToAdd.size())
- dbgs() << "[AAPointerInfo] Inserting access in new offset bins\n";
- );
+ LLVM_DEBUG(if (ToAdd.size()) dbgs()
+ << "[AAPointerInfo] Inserting access in new offset bins\n";);
for (auto Key : ToAdd) {
LLVM_DEBUG(dbgs() << " key " << Key << "\n");
@@ -993,10 +991,8 @@ ChangeStatus AA::PointerInfo::State::addAccess(
// from the offset bins.
AAPointerInfo::RangeList ToRemove;
AAPointerInfo::RangeList::set_
diff erence(ExistingRanges, NewRanges, ToRemove);
- LLVM_DEBUG(
- if (ToRemove.size())
- dbgs() << "[AAPointerInfo] Removing access from old offset bins\n";
- );
+ LLVM_DEBUG(if (ToRemove.size()) dbgs()
+ << "[AAPointerInfo] Removing access from old offset bins\n";);
for (auto Key : ToRemove) {
LLVM_DEBUG(dbgs() << " key " << Key << "\n");
@@ -3119,7 +3115,8 @@ struct AANonConvergentFunction final : AANonConvergentImpl {
/// See AbstractAttribute::updateImpl(...).
ChangeStatus updateImpl(Attributor &A) override {
- // If all function calls are known to not be convergent, we are not convergent.
+ // If all function calls are known to not be convergent, we are not
+ // convergent.
auto CalleeIsNotConvergent = [&](Instruction &Inst) {
CallBase &CB = cast<CallBase>(Inst);
auto *Callee = dyn_cast_if_present<Function>(CB.getCalledOperand());
@@ -3747,8 +3744,9 @@ struct CachedReachabilityAA : public BaseTy {
QueryCache.erase(&RQI);
// Insert a plain RQI (w/o exclusion set) if that makes sense. Two options:
- // 1) If it is reachable, it doesn't matter if we have an exclusion set for this query.
- // 2) We did not use the exclusion set, potentially because there is none.
+ // 1) If it is reachable, it doesn't matter if we have an exclusion set for
+ // this query. 2) We did not use the exclusion set, potentially because
+ // there is none.
if (Result == RQITy::Reachable::Yes || !UsedExclusionSet) {
RQITy PlainRQI(RQI.From, RQI.To);
if (!QueryCache.count(&PlainRQI)) {
@@ -8297,8 +8295,8 @@ struct AAMemoryBehaviorCallSite final : AAMemoryBehaviorImpl {
ME = MemoryEffects::writeOnly();
A.removeAttrs(getIRPosition(), AttrKinds);
- return A.manifestAttrs(getIRPosition(),
- Attribute::getWithMemoryEffects(CB.getContext(), ME));
+ return A.manifestAttrs(
+ getIRPosition(), Attribute::getWithMemoryEffects(CB.getContext(), ME));
}
/// See AbstractAttribute::trackStatistics()
@@ -8666,9 +8664,8 @@ struct AAMemoryLocationImpl : public AAMemoryLocation {
return ChangeStatus::UNCHANGED;
MemoryEffects ME = DeducedAttrs[0].getMemoryEffects();
- return A.manifestAttrs(
- IRP,
- Attribute::getWithMemoryEffects(IRP.getAnchorValue().getContext(), ME));
+ return A.manifestAttrs(IRP, Attribute::getWithMemoryEffects(
+ IRP.getAnchorValue().getContext(), ME));
}
/// See AAMemoryLocation::checkForAllAccessesToMemoryKind(...).
@@ -12023,7 +12020,7 @@ struct AAUnderlyingObjectsFunction final : AAUnderlyingObjectsImpl {
AAUnderlyingObjectsFunction(const IRPosition &IRP, Attributor &A)
: AAUnderlyingObjectsImpl(IRP, A) {}
};
-}
+} // namespace
const char AAReturnedValues::ID = 0;
const char AANoUnwind::ID = 0;
More information about the llvm-commits
mailing list