summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael LeBeane <michael.lebeane@amd.com>2016-09-13 23:11:20 -0400
committerMichael LeBeane <michael.lebeane@amd.com>2016-09-13 23:11:20 -0400
commit6a668d0c0cc915ee2f1950e907cd61723d6b72c7 (patch)
treed222842fbb1006e23fa6c542fc7b1f9c47795e3c
parentfebab25957066cf9b470864b6bda38687918b36d (diff)
downloadgem5-6a668d0c0cc915ee2f1950e907cd61723d6b72c7.tar.xz
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.
-rw-r--r--src/gpu-compute/kernel_cfg.cc2
1 files changed, 1 insertions, 1 deletions
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();