From 9fed031e4eb05a78888fb061a17eeb7346cc43d2 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sat, 13 Jul 2019 10:57:24 -0500 Subject: nir/algebraic: Print out the list of transforms in the C file This helps greatly when debugging algebraic transform generators because you can now actually see the output and verify that your transforms are getting generated. Acked-by: Matt Turner --- src/compiler/nir/nir_algebraic.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/compiler/nir/nir_algebraic.py') diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py index e79fa3cec5e..9b8af1a7470 100644 --- a/src/compiler/nir/nir_algebraic.py +++ b/src/compiler/nir/nir_algebraic.py @@ -1034,6 +1034,13 @@ _algebraic_pass_template = mako.template.Template(""" #include "nir_search.h" #include "nir_search_helpers.h" +/* What follows is NIR algebraic transform code for the following ${len(xforms)} + * transforms: +% for xform in xforms: + * ${xform.search} => ${xform.replace} +% endfor + */ + #ifndef NIR_OPT_ALGEBRAIC_STRUCT_DEFS #define NIR_OPT_ALGEBRAIC_STRUCT_DEFS -- cgit v1.2.3