mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Give some helper classes/functions internal linkage. NFC.
llvm-svn: 287462
This commit is contained in:
parent
04cf2ff75c
commit
7cad84ff09
@ -530,6 +530,7 @@ public:
|
|||||||
virtual Error wait() = 0;
|
virtual Error wait() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace {
|
||||||
class InProcessThinBackend : public ThinBackendProc {
|
class InProcessThinBackend : public ThinBackendProc {
|
||||||
ThreadPool BackendThreadPool;
|
ThreadPool BackendThreadPool;
|
||||||
AddStreamFn AddStream;
|
AddStreamFn AddStream;
|
||||||
@ -629,6 +630,7 @@ public:
|
|||||||
return Error::success();
|
return Error::success();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
} // end anonymous namespace
|
||||||
|
|
||||||
ThinBackend lto::createInProcessThinBackend(unsigned ParallelismLevel) {
|
ThinBackend lto::createInProcessThinBackend(unsigned ParallelismLevel) {
|
||||||
return [=](Config &Conf, ModuleSummaryIndex &CombinedIndex,
|
return [=](Config &Conf, ModuleSummaryIndex &CombinedIndex,
|
||||||
@ -660,6 +662,7 @@ std::string lto::getThinLTOOutputFile(const std::string &Path,
|
|||||||
return NewPath.str();
|
return NewPath.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
class WriteIndexesThinBackend : public ThinBackendProc {
|
class WriteIndexesThinBackend : public ThinBackendProc {
|
||||||
std::string OldPrefix, NewPrefix;
|
std::string OldPrefix, NewPrefix;
|
||||||
bool ShouldEmitImportsFiles;
|
bool ShouldEmitImportsFiles;
|
||||||
@ -717,6 +720,7 @@ public:
|
|||||||
|
|
||||||
Error wait() override { return Error::success(); }
|
Error wait() override { return Error::success(); }
|
||||||
};
|
};
|
||||||
|
} // end anonymous namespace
|
||||||
|
|
||||||
ThinBackend lto::createWriteIndexesThinBackend(std::string OldPrefix,
|
ThinBackend lto::createWriteIndexesThinBackend(std::string OldPrefix,
|
||||||
std::string NewPrefix,
|
std::string NewPrefix,
|
||||||
|
@ -52,9 +52,9 @@ AArch64ELFObjectWriter::~AArch64ELFObjectWriter() {}
|
|||||||
"supported (LP64 eqv: " #lp64rtype ")"
|
"supported (LP64 eqv: " #lp64rtype ")"
|
||||||
|
|
||||||
// assumes IsILP32 is true
|
// assumes IsILP32 is true
|
||||||
bool isNonILP32reloc(const MCFixup &Fixup, AArch64MCExpr::VariantKind RefKind,
|
static bool isNonILP32reloc(const MCFixup &Fixup,
|
||||||
MCContext &Ctx)
|
AArch64MCExpr::VariantKind RefKind,
|
||||||
{
|
MCContext &Ctx) {
|
||||||
if ((unsigned)Fixup.getKind() != AArch64::fixup_aarch64_movw)
|
if ((unsigned)Fixup.getKind() != AArch64::fixup_aarch64_movw)
|
||||||
return false;
|
return false;
|
||||||
switch(RefKind) {
|
switch(RefKind) {
|
||||||
|
@ -31,10 +31,10 @@ using namespace llvm;
|
|||||||
// This is the limit of processor resource usage at which the
|
// This is the limit of processor resource usage at which the
|
||||||
// scheduler should try to look for other instructions (not using the
|
// scheduler should try to look for other instructions (not using the
|
||||||
// critical resource).
|
// critical resource).
|
||||||
cl::opt<int> ProcResCostLim("procres-cost-lim", cl::Hidden,
|
static cl::opt<int> ProcResCostLim("procres-cost-lim", cl::Hidden,
|
||||||
cl::desc("The OOO window for processor "
|
cl::desc("The OOO window for processor "
|
||||||
"resources during scheduling."),
|
"resources during scheduling."),
|
||||||
cl::init(8));
|
cl::init(8));
|
||||||
|
|
||||||
SystemZHazardRecognizer::
|
SystemZHazardRecognizer::
|
||||||
SystemZHazardRecognizer(const MachineSchedContext *C) : DAG(nullptr),
|
SystemZHazardRecognizer(const MachineSchedContext *C) : DAG(nullptr),
|
||||||
|
@ -79,6 +79,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
|
|||||||
INITIALIZE_PASS_END(LibCallsShrinkWrapLegacyPass, "libcalls-shrinkwrap",
|
INITIALIZE_PASS_END(LibCallsShrinkWrapLegacyPass, "libcalls-shrinkwrap",
|
||||||
"Conditionally eliminate dead library calls", false, false)
|
"Conditionally eliminate dead library calls", false, false)
|
||||||
|
|
||||||
|
namespace {
|
||||||
class LibCallsShrinkWrap : public InstVisitor<LibCallsShrinkWrap> {
|
class LibCallsShrinkWrap : public InstVisitor<LibCallsShrinkWrap> {
|
||||||
public:
|
public:
|
||||||
LibCallsShrinkWrap(const TargetLibraryInfo &TLI) : TLI(TLI), Changed(false){};
|
LibCallsShrinkWrap(const TargetLibraryInfo &TLI) : TLI(TLI), Changed(false){};
|
||||||
@ -136,6 +137,7 @@ private:
|
|||||||
SmallVector<CallInst *, 16> WorkList;
|
SmallVector<CallInst *, 16> WorkList;
|
||||||
bool Changed;
|
bool Changed;
|
||||||
};
|
};
|
||||||
|
} // end anonymous namespace
|
||||||
|
|
||||||
// Perform the transformation to calls with errno set by domain error.
|
// Perform the transformation to calls with errno set by domain error.
|
||||||
bool LibCallsShrinkWrap::performCallDomainErrorOnly(CallInst *CI,
|
bool LibCallsShrinkWrap::performCallDomainErrorOnly(CallInst *CI,
|
||||||
@ -534,7 +536,7 @@ void LibCallsShrinkWrapLegacyPass::getAnalysisUsage(AnalysisUsage &AU) const {
|
|||||||
AU.addRequired<TargetLibraryInfoWrapperPass>();
|
AU.addRequired<TargetLibraryInfoWrapperPass>();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool runImpl(Function &F, const TargetLibraryInfo &TLI) {
|
static bool runImpl(Function &F, const TargetLibraryInfo &TLI) {
|
||||||
if (F.hasFnAttribute(Attribute::OptimizeForSize))
|
if (F.hasFnAttribute(Attribute::OptimizeForSize))
|
||||||
return false;
|
return false;
|
||||||
LibCallsShrinkWrap CCDCE(TLI);
|
LibCallsShrinkWrap CCDCE(TLI);
|
||||||
|
Loading…
Reference in New Issue
Block a user