nir/algebraic: Do better error reporting of bad expressions
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 25 Apr 2016 18:36:08 +0000 (11:36 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 27 Apr 2016 18:21:06 +0000 (11:21 -0700)
commit736ee0bef7ec71370185395aeba443e12b6d3813
treeed14e5825f1deb64b94fa6f7db0e6b8b3f953e69
parentb1dcedf393e2464fb70e793b9224c5ad438e2914
nir/algebraic: Do better error reporting of bad expressions

Previously, if an exception was encountered anywhere, nir_algebraic would
just die in a fire with no indication whatsoever as to where the actual bug
is.  This commit makes it print out the particular search-and-replace
expression that is causing problems along with the exception.  Also, it
will now report all of the errors it finds and then exit at the end like a
standard C compiler would do.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/compiler/nir/nir_algebraic.py