implied: re-order where we calculate implications
This change is part of a larger change I am going to commit next. That
change sets it so that we can calculate implications based on previously
stored conditions. The code looks like this:
if (foo & FLAG)
lock();
...
if (foo & FLAG)
unlock();
The problem that I found was that stored conditions stores links. We want
to create the links every time there is a condition. But instead we were
creating the links and then overwriting them with the old implied links.
What we should do, I think now, is use the implications, then evaluate the
condition and create the new links. I have tested this and it works. My
only question is that I obviously went to a lot of effort to preserve the
implied states and write them last. Why did I do that? I cannot remember.
It was in
371953642524 ('implied: use comparison information for
implications'), the changelog is not clear. Also before that patch the
smatch_extra stuff calculated implications and then over wrote them
base on the condition itself.
For now, I'm going to commit this small change and redo it later if I find
an issue.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>