From 6c34d7104e1e8c3abcdac3da7443cb6a3ab071ae Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Thu, 2 May 2019 23:29:02 +0300 Subject: [PATCH] SPU analyser: fix excessive workload list size Typo grade; regression --- rpcs3/Emu/Cell/SPURecompiler.cpp | 7 +++---- rpcs3/Emu/Cell/SPURecompiler.h | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index bddb154ba1..7684eb6e33 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -1910,8 +1910,6 @@ const std::vector& spu_recompiler_base::analyse(const be_t* ls, u32 en break; } } - - block.analysis2 = false; } // Fixup block predeccessors to point to basic blocks, not last instructions @@ -2020,15 +2018,16 @@ const std::vector& spu_recompiler_base::analyse(const be_t* ls, u32 en { const u32 addr = workload[wi]; auto& block = m_bbs.at(addr); - block.analysis2 = true; + block.analysed = true; for (u32 target : block.targets) { auto& tb = m_bbs.at(target); - if (!tb.analysis2) + if (!tb.analysed) { workload.push_back(target); + tb.analysed = true; } } diff --git a/rpcs3/Emu/Cell/SPURecompiler.h b/rpcs3/Emu/Cell/SPURecompiler.h index d36bdaf079..0e9fa9db83 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.h +++ b/rpcs3/Emu/Cell/SPURecompiler.h @@ -236,7 +236,8 @@ protected: // Number of instructions u16 size = 0; - u8 analysis2 : 1; + // Internal use flag + bool analysed = false; // Bit mask of the registers modified in the block std::bitset reg_mod{};