flow: don't reparse inlines over and over
commit6639cac2e98a5d4111eaf4f26b6cf1fb6d85048c
authorDan Carpenter <error27@gmail.com>
Fri, 24 Mar 2023 06:39:47 +0000 (24 09:39 +0300)
committerDan Carpenter <error27@gmail.com>
Fri, 24 Mar 2023 06:39:47 +0000 (24 09:39 +0300)
treec927c22d1b50406f390e83156f1a48ef937b1daf
parent7d4ccb63658fbda35690e06bf67fb2b8a4a4af77
flow: don't reparse inlines over and over

When have an inline statement, there is no need to parse it more than once.
The data is already there in the in-mem DB from the first parse.  Actually
we might want to parse it more than once if it's part of a loop or if it's
in an inline statement.  So that's why we clear the list of already
parsed inlines at the start of every new statement.

The issue is with things like "p = frob();" it gets turned into a fake
assignment like "p->x = frob()->x;".  It ends up taking forever to parse
this and my build is too slow.  So only parsing the inline only once
brings it back to minimal acceptable performance levels for me.

It's still not ideal.

Signed-off-by: Dan Carpenter <error27@gmail.com>
smatch_flow.c