kernel_cfg.cc (11308:7d8836fd043d) kernel_cfg.cc (11623:b56cbe6b63a2)
1/*
2 * Copyright (c) 2012-2015 Advanced Micro Devices, Inc.
3 * All rights reserved.
4 *
5 * For use for simulation and test purposes only
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:

--- 125 unchanged lines hidden (view full) ---

134 BasicBlock* exit_bb = basicBlocks.back().get();
135 for (auto& bb : basicBlocks) {
136 if (bb->isExit()) {
137 break;
138 }
139 GPUStaticInst* last = lastInstruction(bb.get());
140 if (last->o_type == Enums::OT_RET) {
141 bb->successorIds.insert(exit_bb->id);
1/*
2 * Copyright (c) 2012-2015 Advanced Micro Devices, Inc.
3 * All rights reserved.
4 *
5 * For use for simulation and test purposes only
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:

--- 125 unchanged lines hidden (view full) ---

134 BasicBlock* exit_bb = basicBlocks.back().get();
135 for (auto& bb : basicBlocks) {
136 if (bb->isExit()) {
137 break;
138 }
139 GPUStaticInst* last = lastInstruction(bb.get());
140 if (last->o_type == Enums::OT_RET) {
141 bb->successorIds.insert(exit_bb->id);
142 break;
142 continue;
143 }
144 if (last->o_type == Enums::OT_BRANCH) {
145 const uint32_t target_pc = last->getTargetPc();
146 BasicBlock* target_bb = basicBlock(target_pc);
147 bb->successorIds.insert(target_bb->id);
148 }
149
150 // Unconditional jump instructions have a unique successor

--- 146 unchanged lines hidden ---
143 }
144 if (last->o_type == Enums::OT_BRANCH) {
145 const uint32_t target_pc = last->getTargetPc();
146 BasicBlock* target_bb = basicBlock(target_pc);
147 bb->successorIds.insert(target_bb->id);
148 }
149
150 // Unconditional jump instructions have a unique successor

--- 146 unchanged lines hidden ---