mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
Give helper classes/functions local linkage. NFC.
llvm-svn: 351016
This commit is contained in:
parent
a89e77f814
commit
59aee633f2
@ -7519,7 +7519,7 @@ bool LLParser::ParseArgs(std::vector<uint64_t> &Args) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto FwdVIRef = (GlobalValueSummaryMapTy::value_type *)-8;
|
||||
static const auto FwdVIRef = (GlobalValueSummaryMapTy::value_type *)-8;
|
||||
|
||||
static void resolveFwdRef(ValueInfo *Fwd, ValueInfo &Resolved) {
|
||||
bool ReadOnly = Fwd->isReadOnly();
|
||||
|
@ -2376,8 +2376,8 @@ static void emitRangeList(DwarfDebug &DD, AsmPrinter *Asm,
|
||||
}
|
||||
}
|
||||
|
||||
void emitDebugRangesImpl(DwarfDebug &DD, AsmPrinter *Asm,
|
||||
const DwarfFile &Holder, MCSymbol *TableEnd) {
|
||||
static void emitDebugRangesImpl(DwarfDebug &DD, AsmPrinter *Asm,
|
||||
const DwarfFile &Holder, MCSymbol *TableEnd) {
|
||||
for (const RangeSpanList &List : Holder.getRangeLists())
|
||||
emitRangeList(DD, Asm, List);
|
||||
|
||||
|
@ -105,6 +105,7 @@ IRTranslator::IRTranslator() : MachineFunctionPass(ID) {
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
namespace {
|
||||
/// Verify that every instruction created has the same DILocation as the
|
||||
/// instruction being translated.
|
||||
class DILocationVerifier : MachineFunction::Delegate {
|
||||
@ -131,6 +132,7 @@ public:
|
||||
}
|
||||
void MF_HandleRemoval(const MachineInstr &MI) override {}
|
||||
};
|
||||
} // namespace
|
||||
#endif // ifndef NDEBUG
|
||||
|
||||
|
||||
|
@ -73,6 +73,7 @@ static bool isArtifact(const MachineInstr &MI) {
|
||||
using InstListTy = GISelWorkList<256>;
|
||||
using ArtifactListTy = GISelWorkList<128>;
|
||||
|
||||
namespace {
|
||||
class LegalizerWorkListManager : public GISelChangeObserver {
|
||||
InstListTy &InstList;
|
||||
ArtifactListTy &ArtifactList;
|
||||
@ -111,6 +112,7 @@ public:
|
||||
createdInstr(MI);
|
||||
}
|
||||
};
|
||||
} // namespace
|
||||
|
||||
bool Legalizer::runOnMachineFunction(MachineFunction &MF) {
|
||||
// If the ISel pipeline failed, do not bother running that pass.
|
||||
|
@ -295,6 +295,7 @@ Function *HotColdSplitting::extractColdRegion(const BlockSequence &Region,
|
||||
/// A pair of (basic block, score).
|
||||
using BlockTy = std::pair<BasicBlock *, unsigned>;
|
||||
|
||||
namespace {
|
||||
/// A maximal outlining region. This contains all blocks post-dominated by a
|
||||
/// sink block, the sink block itself, and all blocks dominated by the sink.
|
||||
class OutliningRegion {
|
||||
@ -458,6 +459,7 @@ public:
|
||||
return SubRegion;
|
||||
}
|
||||
};
|
||||
} // namespace
|
||||
|
||||
bool HotColdSplitting::outlineColdRegions(Function &F, ProfileSummaryInfo &PSI,
|
||||
BlockFrequencyInfo *BFI,
|
||||
|
@ -185,7 +185,7 @@ static StringRef getFunctionName(const DISubprogram *SP) {
|
||||
/// Prefer relative paths in the coverage notes. Clang also may split
|
||||
/// up absolute paths into a directory and filename component. When
|
||||
/// the relative path doesn't exist, reconstruct the absolute path.
|
||||
SmallString<128> getFilename(const DISubprogram *SP) {
|
||||
static SmallString<128> getFilename(const DISubprogram *SP) {
|
||||
SmallString<128> Path;
|
||||
StringRef RelPath = SP->getFilename();
|
||||
if (sys::fs::exists(RelPath))
|
||||
|
@ -480,6 +480,7 @@ bool llvm::sinkRegion(DomTreeNode *N, AliasAnalysis *AA, LoopInfo *LI,
|
||||
return Changed;
|
||||
}
|
||||
|
||||
namespace {
|
||||
// This is a helper class for hoistRegion to make it able to hoist control flow
|
||||
// in order to be able to hoist phis. The way this works is that we initially
|
||||
// start hoisting to the loop preheader, and when we see a loop invariant branch
|
||||
@ -706,6 +707,7 @@ public:
|
||||
return HoistDestinationMap[BB];
|
||||
}
|
||||
};
|
||||
} // namespace
|
||||
|
||||
/// Walk the specified region of the CFG (defined by all blocks dominated by
|
||||
/// the specified block, and that are in the current loop) in depth first
|
||||
|
@ -80,6 +80,7 @@ static BasicBlock *getOnlyLiveSuccessor(BasicBlock *BB) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
namespace {
|
||||
/// Helper class that can turn branches and switches with constant conditions
|
||||
/// into unconditional branches.
|
||||
class ConstantTerminatorFoldingImpl {
|
||||
@ -538,6 +539,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
};
|
||||
} // namespace
|
||||
|
||||
/// Turn branches and switches with known constant conditions into unconditional
|
||||
/// branches.
|
||||
|
Loading…
Reference in New Issue
Block a user