diff --git a/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp b/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp index 73396eb08a..bd8daaac1b 100644 --- a/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp @@ -1654,11 +1654,10 @@ public: return add_loc->compiled; } - bool add_to_file = false; - if (auto& cache = g_fxo->get(); cache && g_cfg.core.spu_cache && !add_loc->cached.exchange(1)) { - add_to_file = true; + cache.add(func); + spu_log.success("New SPU block detected (size=%u)", func_size); } { @@ -3859,14 +3858,6 @@ public: fs::write_file(m_spurt->get_cache_path() + "spu-ir.log", fs::write + fs::append, llvm_log); } - if (auto& cache = g_fxo->get()) - { - if (add_to_file) - { - cache.add(func); - } - } - fmt::throw_exception("Compilation failed"); } @@ -3953,14 +3944,6 @@ public: // Rebuild trampoline if necessary if (!m_spurt->rebuild_ubertrampoline(func.data[0])) { - if (auto& cache = g_fxo->get()) - { - if (add_to_file) - { - cache.add(func); - } - } - return nullptr; } @@ -3981,16 +3964,6 @@ public: asm("DSB ISH"); #endif - if (auto& cache = g_fxo->get()) - { - if (add_to_file) - { - cache.add(func); - } - - spu_log.success("New SPU block compiled successfully (size=%u)", func_size); - } - return fn; }