Simplify compile threads

This commit is contained in:
Megamouse 2021-01-30 23:03:20 +01:00 committed by Ivan
parent 2025f02105
commit 7bddb87306
2 changed files with 12 additions and 17 deletions

View file

@ -2783,7 +2783,6 @@ bool ppu_initialize(const ppu_module& info, bool check_only)
if (!jit && !check_only)
{
ppu_log.success("LLVM: Module exists: %s", obj_name);
continue;
}
continue;
@ -2829,26 +2828,26 @@ bool ppu_initialize(const ppu_module& info, bool check_only)
// Set low priority
thread_ctrl::scoped_priority low_prio(-1);
for (u32 i = work_cv++; i < workload.size(); i = work_cv++)
for (u32 i = work_cv++; i < workload.size(); i = work_cv++, g_progr_pdone++)
{
if (Emu.IsStopped())
{
continue;
}
// Keep allocating workload
const auto [obj_name, part] = std::as_const(workload)[i];
// Allocate "core"
std::lock_guard jlock(g_fxo->get<jit_core_allocator>()->sem);
if (!Emu.IsStopped())
{
ppu_log.warning("LLVM: Compiling module %s%s", cache_path, obj_name);
ppu_log.warning("LLVM: Compiling module %s%s", cache_path, obj_name);
// Use another JIT instance
jit_compiler jit2({}, g_cfg.core.llvm_cpu, 0x1);
ppu_initialize2(jit2, part, cache_path, obj_name);
// Use another JIT instance
jit_compiler jit2({}, g_cfg.core.llvm_cpu, 0x1);
ppu_initialize2(jit2, part, cache_path, obj_name);
ppu_log.success("LLVM: Compiled module %s", obj_name);
}
g_progr_pdone++;
ppu_log.success("LLVM: Compiled module %s", obj_name);
}
});