nir/schedule: Add a callback for backend-specific dependencies
authorNeil Roberts <nroberts@igalia.com>
Fri, 17 Jul 2020 07:24:02 +0000 (09:24 +0200)
committerNeil Roberts <nroberts@igalia.com>
Fri, 24 Jul 2020 07:21:11 +0000 (09:21 +0200)
commitbafd2591771bae092edba95b2f4913b303b1668b
treeac5acb344ad2adf6cd8c5e5b0ebf5617f8963403
parent260a8f759a7689c27baecc311f32e117965b2de7
nir/schedule: Add a callback for backend-specific dependencies

Adds a callback function to nir_schedule_options to give the backend a
chance to add custom dependencies between certain intrinsics. The
callback can assign a class number to the intrinsic and then set a read
or write dependency on that class.

v2: Use a linked-list of schedule nodes for the dependency classes
    instead of a fixed-sized array.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5953>
src/compiler/nir/nir_schedule.c
src/compiler/nir/nir_schedule.h