aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-06-24 15:53:19 -0700
committerMatt Turner <[email protected]>2014-07-01 08:55:51 -0700
commitc5030ac0ac15d3c91c4352789f94281da9a9dcad (patch)
tree76c87e55c8a69d360180466b977c006dbf693bac /src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
parentbc2fbbafd216676ccc7c3abd794ecb7dd1fa631f (diff)
i965: Use typed foreach_in_list instead of foreach_list.
Acked-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
index 14f95791ae0..cc136a5b948 100644
--- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
@@ -772,8 +772,7 @@ fs_instruction_scheduler::calculate_deps()
memset(last_mrf_write, 0, sizeof(last_mrf_write));
/* top-to-bottom dependencies: RAW and WAW. */
- foreach_list(node, &instructions) {
- schedule_node *n = (schedule_node *)node;
+ foreach_in_list(schedule_node, n, &instructions) {
fs_inst *inst = (fs_inst *)n->inst;
if (inst->opcode == FS_OPCODE_PLACEHOLDER_HALT ||
@@ -1035,8 +1034,7 @@ vec4_instruction_scheduler::calculate_deps()
memset(last_mrf_write, 0, sizeof(last_mrf_write));
/* top-to-bottom dependencies: RAW and WAW. */
- foreach_list(node, &instructions) {
- schedule_node *n = (schedule_node *)node;
+ foreach_in_list(schedule_node, n, &instructions) {
vec4_instruction *inst = (vec4_instruction *)n->inst;
if (inst->has_side_effects())
@@ -1215,9 +1213,7 @@ fs_instruction_scheduler::choose_instruction_to_schedule()
/* Of the instructions ready to execute or the closest to
* being ready, choose the oldest one.
*/
- foreach_list(node, &instructions) {
- schedule_node *n = (schedule_node *)node;
-
+ foreach_in_list(schedule_node, n, &instructions) {
if (!chosen || n->unblocked_time < chosen_time) {
chosen = n;
chosen_time = n->unblocked_time;
@@ -1230,8 +1226,7 @@ fs_instruction_scheduler::choose_instruction_to_schedule()
* shaders which naturally do a better job of hiding instruction
* latency.
*/
- foreach_list(node, &instructions) {
- schedule_node *n = (schedule_node *)node;
+ foreach_in_list(schedule_node, n, &instructions) {
fs_inst *inst = (fs_inst *)n->inst;
if (!chosen) {
@@ -1325,9 +1320,7 @@ vec4_instruction_scheduler::choose_instruction_to_schedule()
/* Of the instructions ready to execute or the closest to being ready,
* choose the oldest one.
*/
- foreach_list(node, &instructions) {
- schedule_node *n = (schedule_node *)node;
-
+ foreach_in_list(schedule_node, n, &instructions) {
if (!chosen || n->unblocked_time < chosen_time) {
chosen = n;
chosen_time = n->unblocked_time;
@@ -1426,9 +1419,7 @@ instruction_scheduler::schedule_instructions(backend_instruction *next_block_hea
* is done.
*/
if (chosen->inst->is_math()) {
- foreach_list(node, &instructions) {
- schedule_node *n = (schedule_node *)node;
-
+ foreach_in_list(schedule_node, n, &instructions) {
if (n->inst->is_math())
n->unblocked_time = MAX2(n->unblocked_time,
time + chosen->latency);
@@ -1455,7 +1446,7 @@ instruction_scheduler::run(exec_list *all_instructions)
* scheduling.
*/
if (remaining_grf_uses) {
- foreach_list(node, all_instructions) {
+ foreach_in_list(schedule_node, node, all_instructions) {
count_remaining_grf_uses((backend_instruction *)node);
}
}
@@ -1472,8 +1463,7 @@ instruction_scheduler::run(exec_list *all_instructions)
}
calculate_deps();
- foreach_list(node, &instructions) {
- schedule_node *n = (schedule_node *)node;
+ foreach_in_list(schedule_node, n, &instructions) {
compute_delay(n);
}