Skip to content

Commit

Permalink
[Attributor][NFCI] Remove anonymous namespaces
Browse files Browse the repository at this point in the history
The namespaces made it more complicate to implement static helpers,
among other things. We should not need them at all.
  • Loading branch information
jdoerfert committed Feb 1, 2022
1 parent 3c8a4c6 commit a5b6aef
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Expand Up @@ -1026,7 +1026,6 @@ struct AA::PointerInfo::State : public AbstractState {
BooleanState BS;
};

namespace {
struct AAPointerInfoImpl
: public StateWrapper<AA::PointerInfo::State, AAPointerInfo> {
using BaseTy = StateWrapper<AA::PointerInfo::State, AAPointerInfo>;
Expand Down Expand Up @@ -5085,7 +5084,6 @@ struct AANoCaptureCallSiteReturned final : AANoCaptureImpl {
STATS_DECLTRACK_CSRET_ATTR(nocapture)
}
};
} // namespace

/// ------------------ Value Simplify Attribute ----------------------------

Expand All @@ -5106,7 +5104,6 @@ bool ValueSimplifyStateType::unionAssumed(Optional<Value *> Other) {
return true;
}

namespace {
struct AAValueSimplifyImpl : AAValueSimplify {
AAValueSimplifyImpl(const IRPosition &IRP, Attributor &A)
: AAValueSimplify(IRP, A) {}
Expand Down Expand Up @@ -7378,7 +7375,6 @@ void AAMemoryBehaviorFloating::analyzeUseIn(Attributor &A, const Use &U,
if (UserI->mayWriteToMemory())
removeAssumedBits(NO_WRITES);
}
} // namespace

/// -------------------- Memory Locations Attributes ---------------------------
/// Includes read-none, argmemonly, inaccessiblememonly,
Expand Down Expand Up @@ -7412,7 +7408,6 @@ std::string AAMemoryLocation::getMemoryLocationsAsStr(
return S;
}

namespace {
struct AAMemoryLocationImpl : public AAMemoryLocation {

AAMemoryLocationImpl(const IRPosition &IRP, Attributor &A)
Expand Down Expand Up @@ -9790,8 +9785,6 @@ struct AAAssumptionInfoCallSite final : AAAssumptionInfoImpl {
}
};

} // namespace

AACallGraphNode *AACallEdgeIterator::operator*() const {
return static_cast<AACallGraphNode *>(const_cast<AACallEdges *>(
&A.getOrCreateAAFor<AACallEdges>(IRPosition::function(**I))));
Expand Down

0 comments on commit a5b6aef

Please sign in to comment.