Add instruction to pseudo user tracking.
commite7fb6e092055425e404052bfc9ffefd38365c009
authorChristopher Li <sparse@chrisli.org>
Wed, 17 Jan 2007 02:36:16 +0000 (16 18:36 -0800)
committerJosh Triplett <josh@freedesktop.org>
Wed, 17 Jan 2007 04:47:04 +0000 (16 20:47 -0800)
tree7c1cd6c88d690be4332440898bd9865fbb5f5abc
parent97c576befecb9024dcc13aceb78742b97902a133
Add instruction to pseudo user tracking.

The current way of tracking pseudo register user is by
keeping a list of the address of the pseudo_t member.
This address can be in part of the instruction member, the
worse case is in the argument list of the call instruction.

As the comment for address_taken() said, using the container
to get instruction pointer is wrong. It use to work with instruction
that relate to symbol address. But that is not true any more. Even
worse, it is very hard to track the pseudo usage other than symbol
address. The only reason symbol address used to works for call instruction
is because call instruction did not directly use the symbol address.

I bit the bullet and just add the instruction pointer to pair with
the pseudo user pointer. So it will work with the case that the
user instruction is call as well.

Testing:

I compare the linearize result with/without the patch on a few
sparse source file it self. The linearize generate exactly
the same result except the symbol address changes. Which is
predictable different because the pseudo user structure allocate
memory.

Singed-Off-By: Christopher Li <sparse@chrisli.org>
flow.c
linearize.c
linearize.h
memops.c
simplify.c