Skip to content

pan/va: Insert flow control properly

Alyssa Rosenzweig requested to merge alyssa/mesa:bi/flow-control into main

Each Valhall instruction specifies flow control: after executing, wait for a dependency, terminate helper threads, reconverge execution, or end the shader. Inserting flow control correctly and efficiently requires tricky data flow analysis. This MR splits the problem in two, separating correctness from performance. The first pass inserts flow control as NOPs throughout the program, and the second pass aggressively merges these NOPs with neighboring instructions. The two passes are separately unit tested. Wiring it all up gets us Valhall support for ILP, cheaper helper invocations, and fewer NOPs.

Merge request reports