53de95cb0d
Switch to using the newly available ir3_legalize_state API in ir3_postsched. This has a few advantages: - Prevents duplication of delay/sync logic. ir3_postsched is currently missing a lot of the complexities implemented in ir3_legalize. Reusing the logic makes sure ir3_postsched is kept up to date with these complexities. - Allows ir3_postsched to have a global view (i.e., across blocks) on delay and sync state. Currently, all information is cleared at the start of blocks which makes us underestimate required delays. - Allows ir3_postsched to have a more accurate view on required sync flags. We currently calculate requirement once based on whether an instruction's sources come from a ss/sy-producer. This does not take into account whether sources have already been synced. Now we can do this. Signed-off-by: Job Noorman <jnoorman@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>