summaryrefslogtreecommitdiff
path: root/src/gpu-compute/wavefront.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu-compute/wavefront.hh')
-rw-r--r--src/gpu-compute/wavefront.hh51
1 files changed, 22 insertions, 29 deletions
diff --git a/src/gpu-compute/wavefront.hh b/src/gpu-compute/wavefront.hh
index 4fe66ecfe..20007bd83 100644
--- a/src/gpu-compute/wavefront.hh
+++ b/src/gpu-compute/wavefront.hh
@@ -52,6 +52,27 @@
static const int MAX_NUM_INSTS_PER_WF = 12;
+/**
+ * A reconvergence stack entry conveys the necessary state to implement
+ * control flow divergence.
+ */
+struct ReconvergenceStackEntry {
+ /**
+ * PC of current instruction.
+ */
+ uint32_t pc;
+ /**
+ * PC of the immediate post-dominator instruction, i.e., the value of
+ * @a pc for the first instruction that will be executed by the wavefront
+ * when a reconvergence point is reached.
+ */
+ uint32_t rpc;
+ /**
+ * Execution mask.
+ */
+ VectorMask execMask;
+};
+
/*
* Arguments for the hsail opcode call, are user defined and variable length.
* The hardware/finalizer can support arguments in hardware or use memory to
@@ -120,34 +141,6 @@ class CallArgMem
}
};
-/**
- * A reconvergence stack entry conveys the necessary state to implement
- * control flow divergence.
- */
-class ReconvergenceStackEntry {
-
- public:
- ReconvergenceStackEntry(uint32_t new_pc, uint32_t new_rpc,
- VectorMask new_mask) : pc(new_pc), rpc(new_rpc),
- execMask(new_mask) {
- }
-
- /**
- * PC of current instruction.
- */
- uint32_t pc;
- /**
- * PC of the immediate post-dominator instruction, i.e., the value of
- * @a pc for the first instruction that will be executed by the wavefront
- * when a reconvergence point is reached.
- */
- uint32_t rpc;
- /**
- * Execution mask.
- */
- VectorMask execMask;
-};
-
class Wavefront : public SimObject
{
public:
@@ -368,7 +361,7 @@ class Wavefront : public SimObject
* point (branch instruction), and shrinks every time the wavefront
* reaches a reconvergence point (immediate post-dominator instruction).
*/
- std::stack<std::unique_ptr<ReconvergenceStackEntry>> reconvergenceStack;
+ std::deque<std::unique_ptr<ReconvergenceStackEntry>> reconvergenceStack;
};
#endif // __WAVEFRONT_HH__