panfrost/midgard: Refactor tag lookahead code
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 17 Feb 2019 03:35:03 +0000 (03:35 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Thu, 21 Feb 2019 07:05:59 +0000 (07:05 +0000)
commit5e55c11a1b2a0cfe91fcf58785fabe1269f1c439
treea0a3136b96703fc41c1f058d90786b8924d25541
parent396eb1440a84d6ee69a74e9e6bf189718b91481d
panfrost/midgard: Refactor tag lookahead code

Each Midgard instruction is scheduled to a particular instruction type
("tag"). Presumably the hardware prefetches memory based on tag, so it
is required to report out the first tag to the command stream and the
next tag of a branch target. This procedure was implemented in two
separate parts of the compiler (one time with a slight bug relating to
empty blocks); this patch refactors to unite the two routines and solve
the bug when branching to empty blocks.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/midgard/midgard_compile.c