From 5333c17cca1ce1880f9eaa709b4688a0dcf1175f Mon Sep 17 00:00:00 2001 From: degasus Date: Sat, 28 Jul 2018 08:18:05 +0200 Subject: [PATCH] Jit: Fix branch following. The idea of this code was to not unroll loops, but it was completely broken. So we've unrolled all loops, but only up to the second iteration. Honestly, a better check would test if we branch to code which is already in the compiling block. But this is out of scope for now. But testing shows that this unrolling actually improve the performance. So instead of fixing this bug, this check can be dropped. --- Source/Core/Core/PowerPC/PPCAnalyst.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp index b4f270bfa0..89c57b9bcb 100644 --- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp @@ -714,9 +714,7 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, std: if (inst.OPCD == 18 && block_size > 1) { // Always follow BX instructions. - // TODO: Loop unrolling might bloat the code size too much. - // Enable it carefully. - follow = destination != block->m_address; + follow = true; destination = SignExt26(inst.LI << 2) + (inst.AA ? 0 : address); if (inst.LK) {