nir/algebraic: Detect some kinds of malformed variable names
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 24 Apr 2020 00:39:07 +0000 (17:39 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 27 Apr 2020 16:08:34 +0000 (09:08 -0700)
commitba8f7f3fa2c62ba8cc31dda5915b4e2a58eef00a
tree632d9cbf7f0b1a347582ff9ec7c1d7e16e67955a
parentfc4eb0714cd6ddf3aaeb865ef0694fc6596f6d56
nir/algebraic: Detect some kinds of malformed variable names

I spent over an hour trying to debug a problem if a condition on a
variable not being applied.  The problem turned out to be
"a(is_not_negative" instead of "a(is_not_negative)".  This commit would
have detected that problem and failed to build.

v2: Just add $ to the end of the existing regex, and it will fail to
match a malformed string.  Suggested by Jason.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4720>
src/compiler/nir/nir_algebraic.py