virtual Error wait() = 0;
};
+namespace {
class InProcessThinBackend : public ThinBackendProc {
ThreadPool BackendThreadPool;
AddStreamFn AddStream;
return Error::success();
}
};
+} // end anonymous namespace
ThinBackend lto::createInProcessThinBackend(unsigned ParallelismLevel) {
return [=](Config &Conf, ModuleSummaryIndex &CombinedIndex,
return NewPath.str();
}
+namespace {
class WriteIndexesThinBackend : public ThinBackendProc {
std::string OldPrefix, NewPrefix;
bool ShouldEmitImportsFiles;
Error wait() override { return Error::success(); }
};
+} // end anonymous namespace
ThinBackend lto::createWriteIndexesThinBackend(std::string OldPrefix,
std::string NewPrefix,
"supported (LP64 eqv: " #lp64rtype ")"
// assumes IsILP32 is true
-bool isNonILP32reloc(const MCFixup &Fixup, AArch64MCExpr::VariantKind RefKind,
- MCContext &Ctx)
-{
+static bool isNonILP32reloc(const MCFixup &Fixup,
+ AArch64MCExpr::VariantKind RefKind,
+ MCContext &Ctx) {
if ((unsigned)Fixup.getKind() != AArch64::fixup_aarch64_movw)
return false;
switch(RefKind) {
// This is the limit of processor resource usage at which the
// scheduler should try to look for other instructions (not using the
// critical resource).
-cl::opt<int> ProcResCostLim("procres-cost-lim", cl::Hidden,
- cl::desc("The OOO window for processor "
- "resources during scheduling."),
- cl::init(8));
+static cl::opt<int> ProcResCostLim("procres-cost-lim", cl::Hidden,
+ cl::desc("The OOO window for processor "
+ "resources during scheduling."),
+ cl::init(8));
SystemZHazardRecognizer::
SystemZHazardRecognizer(const MachineSchedContext *C) : DAG(nullptr),
INITIALIZE_PASS_END(LibCallsShrinkWrapLegacyPass, "libcalls-shrinkwrap",
"Conditionally eliminate dead library calls", false, false)
+namespace {
class LibCallsShrinkWrap : public InstVisitor<LibCallsShrinkWrap> {
public:
LibCallsShrinkWrap(const TargetLibraryInfo &TLI) : TLI(TLI), Changed(false){};
SmallVector<CallInst *, 16> WorkList;
bool Changed;
};
+} // end anonymous namespace
// Perform the transformation to calls with errno set by domain error.
bool LibCallsShrinkWrap::performCallDomainErrorOnly(CallInst *CI,
AU.addRequired<TargetLibraryInfoWrapperPass>();
}
-bool runImpl(Function &F, const TargetLibraryInfo &TLI) {
+static bool runImpl(Function &F, const TargetLibraryInfo &TLI) {
if (F.hasFnAttribute(Attribute::OptimizeForSize))
return false;
LibCallsShrinkWrap CCDCE(TLI);