From: Michael LeBeane Date: Wed, 14 Sep 2016 03:11:20 +0000 (-0400) Subject: gpu-compute: Fix bug with return in cfg X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a668d0c0cc915ee2f1950e907cd61723d6b72c7;p=gem5.git gpu-compute: Fix bug with return in cfg Connecting basic blocks would stop too early in kernels where ret was not the last instruction. This patch allows basic blocks after the ret instruction to be properly connected. --- diff --git a/src/gpu-compute/kernel_cfg.cc b/src/gpu-compute/kernel_cfg.cc index 7e0e10912..10ded11b7 100644 --- a/src/gpu-compute/kernel_cfg.cc +++ b/src/gpu-compute/kernel_cfg.cc @@ -139,7 +139,7 @@ ControlFlowInfo::connectBasicBlocks() GPUStaticInst* last = lastInstruction(bb.get()); if (last->o_type == Enums::OT_RET) { bb->successorIds.insert(exit_bb->id); - break; + continue; } if (last->o_type == Enums::OT_BRANCH) { const uint32_t target_pc = last->getTargetPc();