From 188151fa995048d5e63fb5f4b8356c17d249e563 Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:13:42 +0200 Subject: [PATCH] SPU/misc: Remove outdated Instruction statistics --- rpcs3/Emu/Cell/SPUCommonRecompiler.cpp | 102 ------------------------- rpcs3/Emu/Cell/SPULLVMRecompiler.cpp | 18 ++--- 2 files changed, 6 insertions(+), 114 deletions(-) diff --git a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp index 4d04b13666..a930bdc548 100644 --- a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp @@ -1176,108 +1176,6 @@ void spu_cache::initialize(bool build_existing_cache) if ((g_cfg.core.spu_decoder == spu_decoder_type::asmjit || g_cfg.core.spu_decoder == spu_decoder_type::llvm) && !func_list.empty()) { spu_log.success("SPU Runtime: Built %u functions.", func_list.size()); - - if (g_cfg.core.spu_debug) - { - std::string dump; - dump.reserve(10'000'000); - - std::map, spu_program*, span_less> sorted; - - for (auto&& f : func_list) - { - // Interpret as a byte string - std::span data = {reinterpret_cast(f.data.data()), f.data.size() * sizeof(u32)}; - - sorted[data] = &f; - } - - std::unordered_set depth_n; - - u32 n_max = 0; - - for (auto&& [bytes, f] : sorted) - { - { - sha1_context ctx; - u8 output[20]; - - sha1_starts(&ctx); - sha1_update(&ctx, bytes.data(), bytes.size()); - sha1_finish(&ctx, output); - fmt::append(dump, "\n\t[%s] ", fmt::base57(output)); - } - - u32 depth_m = 0; - - for (auto&& [data, f2] : sorted) - { - u32 depth = 0; - - if (f2 == f) - { - continue; - } - - for (u32 i = 0; i < bytes.size(); i++) - { - if (i < data.size() && data[i] == bytes[i]) - { - depth++; - } - else - { - break; - } - } - - depth_n.emplace(depth); - depth_m = std::max(depth, depth_m); - } - - fmt::append(dump, "c=%06d,d=%06d ", depth_n.size(), depth_m); - - bool sk = false; - - for (u32 i = 0; i < std::min(bytes.size(), std::max(256, depth_m)); i++) - { - if (depth_m == i) - { - dump += '|'; - sk = true; - } - - fmt::append(dump, "%02x", bytes[i]); - - if (i % 4 == 3) - { - if (sk) - { - sk = false; - } - else - { - dump += ' '; - } - - dump += ' '; - } - } - - fmt::append(dump, "\n\t%49s", ""); - - for (u32 i = 0; i < std::min(f->data.size(), std::max(64, utils::aligned_div(depth_m, 4))); i++) - { - fmt::append(dump, "%-10s", g_spu_iname.decode(std::bit_cast>(f->data[i]))); - } - - n_max = std::max(n_max, ::size32(depth_n)); - - depth_n.clear(); - } - - spu_log.notice("SPU Cache Dump (max_c=%d): %s", n_max, dump); - } } // Initialize global cache instance diff --git a/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp b/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp index eb44289320..2e14b09517 100644 --- a/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp @@ -2802,12 +2802,9 @@ public: std::string& llvm_log = function_log; raw_string_ostream out(llvm_log); - if (g_cfg.core.spu_debug) - { - fmt::append(llvm_log, "LLVM IR at 0x%x:\n", func.entry_point); - out << *_module; // print IR - out << "\n\n"; - } + fmt::append(llvm_log, "LLVM IR at 0x%x:\n", func.entry_point); + out << *_module; // print IR + out << "\n\n"; if (verifyModule(*_module, &out)) { @@ -3274,12 +3271,9 @@ public: std::string llvm_log; raw_string_ostream out(llvm_log); - if (g_cfg.core.spu_debug) - { - fmt::append(llvm_log, "LLVM IR (interpreter):\n"); - out << *_module; // print IR - out << "\n\n"; - } + fmt::append(llvm_log, "LLVM IR (interpreter):\n"); + out << *_module; // print IR + out << "\n\n"; if (verifyModule(*_module, &out)) {