mesa/src/microsoft/clc
Alyssa Rosenzweig c39896b17b nir: Use getters for nir_src::parent_*
First, we need to give the parent_instr field a unique name to be able to
replace with a helper.  We have parent_instr fields for both nir_src and
nir_def, so let's rename nir_src::parent_instr in preparation for rework.

This was done with a combination of sed and manual fix-ups.

Then we use semantic patches plus manual fixups:

    @@
    expression s;
    @@

    -s->renamed_parent_instr
    +nir_src_parent_instr(s)

    @@
    expression s;
    @@

    -s.renamed_parent_instr
    +nir_src_parent_instr(&s)

    @@
    expression s;
    @@

    -s->parent_if
    +nir_src_parent_if(s)

    @@
    expression s;
    @@

    -s.renamed_parent_if
    +nir_src_parent_if(&s)

    @@
    expression s;
    @@

    -s->is_if
    +nir_src_is_if(s)

    @@
    expression s;
    @@

    -s.is_if
    +nir_src_is_if(&s)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24671>
2023-10-10 04:58:05 -04:00
..
clc_compiler.c nir: Use getters for nir_src::parent_* 2023-10-10 04:58:05 -04:00
clc_compiler.h microsoft/clc: Add shader model / validator to compiler API 2023-03-31 00:37:19 +00:00
clc_compiler_test.cpp microsoft/compiler: Emit const accesses as load_deref 2023-06-13 00:43:36 +00:00
clc_nir.c treewide: Use nir_before/after_impl for more elaborate cases 2023-08-30 19:30:58 +00:00
clc_nir.h nir: extract the clc inline sampler dedup pass from clc 2022-08-04 23:53:50 +00:00
clon12compiler.def Move a bunch of the CLC stuff from src/microsoft to common code 2021-09-30 07:09:08 +00:00
compute_test.cpp treewide: Replace the usage of TRUE/FALSE with true/false 2023-06-27 18:18:28 +08:00
compute_test.h microsoft/clc: fixup indentation 2022-04-29 07:08:57 +00:00
meson.build meson: Remove unnecessary inc_compiler mentions 2023-09-22 14:52:50 +00:00