helper: keep a small cache of recently used variable names
commit85654bc8d8abb68febe1e14ed5a23535d52f3c0c
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Dec 2017 13:48:03 +0000 (7 16:48 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Dec 2017 13:48:03 +0000 (7 16:48 +0300)
tree2d2eb08bf514660254442718a0bfbf5a394efc8c
parentf0907fbac1f9ccdb5758bfa16ce67abeaa1220b3
helper: keep a small cache of recently used variable names

Smatch does a lot of changing expression to str/sym pairs.  It ends up
that we call expr_to_str(expr) over and over for the same expression.
So instead of doing the work everytime, we can keep a small cache of the
most recently used variables to speed up the process.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_helper.c