nir: Factor out most of the algebraic passes C code to .c/.h.
authorEric Anholt <eric@anholt.net>
Mon, 23 Sep 2019 21:36:32 +0000 (14:36 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 4 Oct 2019 19:15:01 +0000 (19:15 +0000)
commit3cc914921e69b4458d4480a64aafe0f2823c76e2
treefc3393bbb4597fd263761fb28b34f08b0389d904
parentc23db0df1893ee755d7c4ed182ba734a019afe43
nir: Factor out most of the algebraic passes C code to .c/.h.

Working on the algebraic implementation, I was being driven nuts by my
editor not highlighting and handling indentation for the C code.  It turns
out that it's basically not pass-specific code, and we can move it over to
the relevant .c file.  Replaces 30KB of code with 34KB of data on my i965
build.  No perf diff on shader-db (n=3)

Reviewed-by: Ian Romanick <ian.d.romainck@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir_algebraic.py
src/compiler/nir/nir_search.c
src/compiler/nir/nir_search.h