aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/ir3/ir3.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c
index feec723abd0..68e83f7495e 100644
--- a/src/freedreno/ir3/ir3.c
+++ b/src/freedreno/ir3/ir3.c
@@ -1071,11 +1071,12 @@ ir3_count_instructions(struct ir3 *ir)
{
unsigned cnt = 0;
list_for_each_entry (struct ir3_block, block, &ir->block_list, node) {
+ block->start_ip = cnt;
+ block->end_ip = cnt;
list_for_each_entry (struct ir3_instruction, instr, &block->instr_list, node) {
instr->ip = cnt++;
+ block->end_ip = instr->ip;
}
- block->start_ip = list_first_entry(&block->instr_list, struct ir3_instruction, node)->ip;
- block->end_ip = list_last_entry(&block->instr_list, struct ir3_instruction, node)->ip;
}
return cnt;
}