diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index 7684eb6e33..452eab489b 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -1935,15 +1935,7 @@ const std::vector& spu_recompiler_base::analyse(const be_t* ls, u32 en auto& block = m_bbs.at(addr); const u32 _new = block.chunk; - if (m_entry_info[addr / 4]) - { - // Register empty chunk - if (auto emp = m_chunks.try_emplace(addr); emp.second) - { - emp.first->second.joinable = m_ret_info[addr / 4]; - } - } - else + if (!m_entry_info[addr / 4]) { // Check block predecessors for (u32 pred : block.preds) @@ -1992,7 +1984,7 @@ const std::vector& spu_recompiler_base::analyse(const be_t* ls, u32 en m_entry_info[entry / 4] = true; // Acknowledge artificial (reversible) chunk entry point - m_chunks[entry].joinable = true; + m_ret_info[entry / 4] = true; } for (auto& bb : m_bbs) @@ -2002,14 +1994,6 @@ const std::vector& spu_recompiler_base::analyse(const be_t* ls, u32 en } } - // Fill chunk info - for (auto& bb : m_bbs) - { - auto& chunk = m_chunks.at(bb.second.chunk); - - chunk.bbs.push_back(bb.first); - } - workload.clear(); workload.push_back(entry_point); @@ -2055,7 +2039,7 @@ const std::vector& spu_recompiler_base::analyse(const be_t* ls, u32 en } } - if (m_entry_info[addr / 4] && !m_chunks.at(addr).joinable) + if (m_entry_info[addr / 4] && !m_ret_info[addr / 4]) { for (u32 i = 0; i < s_reg_max; i++) { @@ -2089,7 +2073,7 @@ const std::vector& spu_recompiler_base::analyse(const be_t* ls, u32 en } } - if (tb.chunk != block.chunk && m_entry_info[target / 4] && !m_chunks.at(target).joinable) + if (tb.chunk != block.chunk && !(m_entry_info[target / 4] && m_ret_info[target / 4])) { // Skip call targets completely continue; @@ -2160,15 +2144,7 @@ void spu_recompiler_base::dump(std::string& out) { if (m_block_info[bb.first / 4]) { - fmt::append(out, "?: [0x%05x] %s\n", bb.first, m_entry_info[bb.first / 4] ? (m_ret_info[bb.first / 4] ? "Return" : "Entry") : "Block"); - - if (auto found = m_chunks.find(bb.first); found != m_chunks.end()) - { - if (found->second.joinable) - fmt::append(out, "\tJoinable chunk.\n"); - else - fmt::append(out, "\tNon-joinable chunk.\n"); - } + fmt::append(out, "?: [0x%05x] %s\n", bb.first, m_entry_info[bb.first / 4] ? (m_ret_info[bb.first / 4] ? "Chunk" : "Entry") : "Block"); for (u32 pred : bb.second.preds) { diff --git a/rpcs3/Emu/Cell/SPURecompiler.h b/rpcs3/Emu/Cell/SPURecompiler.h index 0e9fa9db83..af5ad3c70f 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.h +++ b/rpcs3/Emu/Cell/SPURecompiler.h @@ -224,7 +224,7 @@ protected: // List of function entry points and return points (set after BRSL, BRASL, BISL, BISLED) std::bitset<0x10000> m_entry_info; - // Set after return points + // Set after return points and disjoint chunks std::bitset<0x10000> m_ret_info; // Basic block information @@ -261,11 +261,6 @@ protected: // Advanced block (chunk) information struct chunk_info { - // Flag set for synthetic chunks (false for call targets and return locations) - bool joinable = false; - - // List of basic blocks - std::basic_string bbs; }; // Sorted chunk info