summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/LTO/LTO.cpp16
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp11
2 files changed, 14 insertions, 13 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 282e127ac5d..c12a8ee32e2 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -185,7 +185,7 @@ LTO::LTO(Config Conf, ThinBackend Backend,
void LTO::addSymbolToGlobalRes(IRObjectFile *Obj,
SmallPtrSet<GlobalValue *, 8> &Used,
const InputFile::Symbol &Sym,
- SymbolResolution Res, size_t Partition) {
+ SymbolResolution Res, unsigned Partition) {
GlobalValue *GV = Obj->getSymbolGV(Sym.I->getRawDataRefImpl());
auto &GlobalRes = GlobalResolutions[Sym.getName()];
@@ -345,7 +345,7 @@ Error LTO::addThinLTO(std::unique_ptr<InputFile> Input,
return Error();
}
-size_t LTO::getMaxTasks() const {
+unsigned LTO::getMaxTasks() const {
CalledGetMaxTasks = true;
return RegularLTO.ParallelCodeGenParallelismLevel + ThinLTO.ModuleMap.size();
}
@@ -408,7 +408,7 @@ public:
ModuleToDefinedGVSummaries(ModuleToDefinedGVSummaries) {}
virtual ~ThinBackendProc() {}
- virtual Error start(size_t Task, MemoryBufferRef MBRef,
+ virtual Error start(unsigned Task, MemoryBufferRef MBRef,
StringMap<FunctionImporter::ImportMapTy> &ImportLists,
MapVector<StringRef, MemoryBufferRef> &ModuleMap) = 0;
virtual Error wait() = 0;
@@ -430,7 +430,7 @@ public:
BackendThreadPool(ThinLTOParallelismLevel) {}
Error
- runThinLTOBackendThread(AddStreamFn AddStream, size_t Task,
+ runThinLTOBackendThread(AddStreamFn AddStream, unsigned Task,
MemoryBufferRef MBRef,
ModuleSummaryIndex &CombinedIndex,
const FunctionImporter::ImportMapTy &ImportList,
@@ -446,7 +446,7 @@ public:
ImportList, DefinedGlobals, ModuleMap);
}
- Error start(size_t Task, MemoryBufferRef MBRef,
+ Error start(unsigned Task, MemoryBufferRef MBRef,
StringMap<FunctionImporter::ImportMapTy> &ImportLists,
MapVector<StringRef, MemoryBufferRef> &ModuleMap) override {
StringRef ModulePath = MBRef.getBufferIdentifier();
@@ -529,7 +529,7 @@ public:
return NewPath.str();
}
- Error start(size_t Task, MemoryBufferRef MBRef,
+ Error start(unsigned Task, MemoryBufferRef MBRef,
StringMap<FunctionImporter::ImportMapTy> &ImportLists,
MapVector<StringRef, MemoryBufferRef> &ModuleMap) override {
StringRef ModulePath = MBRef.getBufferIdentifier();
@@ -629,8 +629,8 @@ Error LTO::runThinLTO(AddStreamFn AddStream) {
// ParallelCodeGenParallelismLevel, as tasks 0 through
// ParallelCodeGenParallelismLevel-1 are reserved for parallel code generation
// partitions.
- size_t Task = RegularLTO.ParallelCodeGenParallelismLevel;
- size_t Partition = 1;
+ unsigned Task = RegularLTO.ParallelCodeGenParallelismLevel;
+ unsigned Partition = 1;
for (auto &Mod : ThinLTO.ModuleMap) {
if (Error E = BackendProc->start(Task, Mod.second, ImportLists,
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 5e06a06cadc..33d4f39ff2c 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -46,7 +46,7 @@ Error Config::addSaveTemps(std::string OutputFileName,
auto setHook = [&](std::string PathSuffix, ModuleHookFn &Hook) {
// Keep track of the hook provided by the linker, which also needs to run.
ModuleHookFn LinkerHook = Hook;
- Hook = [=](size_t Task, Module &M) {
+ Hook = [=](unsigned Task, Module &M) {
// If the linker's hook returned false, we need to pass that result
// through.
if (LinkerHook && !LinkerHook(Task, M))
@@ -115,7 +115,8 @@ createTargetMachine(Config &C, StringRef TheTriple, const Target *TheTarget) {
C.CodeModel, C.CGOptLevel));
}
-bool opt(Config &C, TargetMachine *TM, size_t Task, Module &M, bool IsThinLto) {
+bool opt(Config &C, TargetMachine *TM, unsigned Task, Module &M,
+ bool IsThinLto) {
M.setDataLayout(TM->createDataLayout());
legacy::PassManager passes;
@@ -143,7 +144,7 @@ bool opt(Config &C, TargetMachine *TM, size_t Task, Module &M, bool IsThinLto) {
return true;
}
-void codegen(Config &C, TargetMachine *TM, AddStreamFn AddStream, size_t Task,
+void codegen(Config &C, TargetMachine *TM, AddStreamFn AddStream, unsigned Task,
Module &M) {
if (C.PreCodeGenModuleHook && !C.PreCodeGenModuleHook(Task, M))
return;
@@ -234,8 +235,8 @@ Error lto::backend(Config &C, AddStreamFn AddStream,
return Error();
}
-Error lto::thinBackend(Config &C, size_t Task, AddStreamFn AddStream, Module &M,
- ModuleSummaryIndex &CombinedIndex,
+Error lto::thinBackend(Config &C, unsigned Task, AddStreamFn AddStream,
+ Module &M, ModuleSummaryIndex &CombinedIndex,
const FunctionImporter::ImportMapTy &ImportList,
const GVSummaryMapTy &DefinedGlobals,
MapVector<StringRef, MemoryBufferRef> &ModuleMap) {
OpenPOWER on IntegriCloud