diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/MC/MCParser/DarwinAsmParser.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp | 10 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 7 |
3 files changed, 14 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCParser/DarwinAsmParser.cpp b/llvm/lib/MC/MCParser/DarwinAsmParser.cpp index 195ddc78d45..5bbf49290f1 100644 --- a/llvm/lib/MC/MCParser/DarwinAsmParser.cpp +++ b/llvm/lib/MC/MCParser/DarwinAsmParser.cpp @@ -1086,7 +1086,7 @@ bool DarwinAsmParser::parseVersionMin(StringRef Directive, SMLoc Loc, return false; } -Triple::OSType getOSTypeFromPlatform(MachO::PlatformType Type) { +static Triple::OSType getOSTypeFromPlatform(MachO::PlatformType Type) { switch (Type) { case MachO::PLATFORM_MACOS: return Triple::MacOSX; case MachO::PLATFORM_IOS: return Triple::IOS; diff --git a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp index 8b6c571dee0..74086185118 100644 --- a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp +++ b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp @@ -27,6 +27,8 @@ using namespace llvm; +namespace { + // -------------------------------------------------------------------- // Implementation of permutation networks. @@ -147,6 +149,7 @@ private: void build(); bool color(); }; +} // namespace std::pair<bool,uint8_t> Coloring::getUniqueColor(const NodeSet &Nodes) { uint8_t Color = None; @@ -300,6 +303,7 @@ void Coloring::dump() const { dbgs() << " }\n}\n"; } +namespace { // Base class of for reordering networks. They don't strictly need to be // permutations, as outputs with repeated occurrences of an input element // are allowed. @@ -408,7 +412,7 @@ struct BenesNetwork : public PermNetwork { private: bool route(ElemType *P, RowType *T, unsigned Size, unsigned Step); }; - +} // namespace bool ForwardDeltaNetwork::route(ElemType *P, RowType *T, unsigned Size, unsigned Step) { @@ -602,6 +606,7 @@ bool BenesNetwork::route(ElemType *P, RowType *T, unsigned Size, // Support for building selection results (output instructions that are // parts of the final selection). +namespace { struct OpRef { OpRef(SDValue V) : OpV(V) {} bool isValue() const { return OpV.getNode() != nullptr; } @@ -689,6 +694,7 @@ struct ResultStack { void print(raw_ostream &OS, const SelectionDAG &G) const; }; +} // namespace void OpRef::print(raw_ostream &OS, const SelectionDAG &G) const { if (isValue()) { @@ -740,6 +746,7 @@ void ResultStack::print(raw_ostream &OS, const SelectionDAG &G) const { } } +namespace { struct ShuffleMask { ShuffleMask(ArrayRef<int> M) : Mask(M) { for (unsigned I = 0, E = Mask.size(); I != E; ++I) { @@ -763,6 +770,7 @@ struct ShuffleMask { return ShuffleMask(Mask.take_back(H)); } }; +} // namespace // -------------------------------------------------------------------- // The HvxSelector class. diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index c3fa05a11a2..fe106e33bca 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -880,9 +880,10 @@ bool InductionDescriptor::isFPInductionPHI(PHINode *Phi, const Loop *TheLoop, /// If we are able to find such sequence, we return the instructions /// we found, namely %casted_phi and the instructions on its use-def chain up /// to the phi (not including the phi). -bool getCastsForInductionPHI( - PredicatedScalarEvolution &PSE, const SCEVUnknown *PhiScev, - const SCEVAddRecExpr *AR, SmallVectorImpl<Instruction *> &CastInsts) { +static bool getCastsForInductionPHI(PredicatedScalarEvolution &PSE, + const SCEVUnknown *PhiScev, + const SCEVAddRecExpr *AR, + SmallVectorImpl<Instruction *> &CastInsts) { assert(CastInsts.empty() && "CastInsts is expected to be empty."); auto *PN = cast<PHINode>(PhiScev->getValue()); |