freedreno/ir3: number instructions from one
authorRob Clark <robdclark@chromium.org>
Wed, 15 Jan 2020 22:23:23 +0000 (14:23 -0800)
committerMarge Bot <eric+marge@anholt.net>
Sat, 1 Feb 2020 02:40:22 +0000 (02:40 +0000)
ra_block_compute_live_ranges() treats zero as "not yet defined", so
probably best to not let this be a valid instruction #

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>

src/freedreno/ir3/ir3.c

index 18c2936caa720b9fc733d2a98d8f0f69d3c7b2e0..b9bcf3b08bdbd3660009a9c0c893c8426ec72409 100644 (file)
@@ -1105,7 +1105,7 @@ ir3_clear_mark(struct ir3 *ir)
 unsigned
 ir3_count_instructions(struct ir3 *ir)
 {
-       unsigned cnt = 0;
+       unsigned cnt = 1;
        foreach_block (block, &ir->block_list) {
                block->start_ip = cnt;
                block->end_ip = cnt;