| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Josh Triplett <josh@freedesktop.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Josh Triplett <josh@freedesktop.org>
|
|
|
|
|
|
|
|
| |
This shows that we have some inlining bug where we seem to
be corrupting the offsetting of an array. So right now the
warnings we get in the kernel seem to be bogus, but this
should help find that other bug too, and it doesn't trigger
often enough to be too distracting.
|
|
|
|
|
|
| |
with the OP_SYMADDR simplifications.
It's still wrong. Now it just happens to work in most cases.
|
|
|
|
|
|
|
| |
(symbol addresses).
They are pretty different. Symbol addresses have special meaning during
various phases, from symbol simplification to CSE.
|
|
|
|
|
|
|
|
| |
the entry bb magical, just make the OP_ENTRY instruction act
like an OP_CALL from a dominance standpoint: it dominates all
non-local memory operations.
This removes yet another special case.
|
|
|
|
|
|
|
|
| |
entry basic block in memop dominators.
This caused the dominator finding to totally misjudge a lot of
non-local loads as having no dominators (or thinking they were
being completely dominated by a store that just updated them).
|
|
|
|
|
|
|
|
|
|
| |
This is purely for debugging. It's only used to show what symbol
a pseudo might be (and I stress "might", since CSE can and does
screw it up) associated with.
Also print out the def list for a basic block when verbose.
It all makes it a bit easier to guess what's up.
|
|
|
|
|
|
|
|
|
|
| |
We should drop symbol types by now, and base things on just raw
sizes. Anything else just doesn't work from a CSE standpoint.
Some things may care about actual types later, notably the type-
based alias analysis. Those types still exist in the cast nodes.
Also, make the printout be more readable.
|
|
|
|
|
| |
to it, it's not correct to assume that a bb without parents
is the entrypoint.
|
|
It's a bit more simple-minded than the symbol simplification,
and it can be more costly. So we start off with the (cheap)
symbol simplification algorithm, and then use this new more
generic phase later.
This allows us to remove extra loads (and, in theory, stores,
but the dead store elimination is so simple-minded right now
that it's effectively useless).
|