| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Now that we have full pseudo usage lists, we can also add
deathnotes to pseudos in the instruction stream.
NOTE! We add the deathnote to _before_ the last instruction
that uses that pseudo. That looks a bit strange, but it's
actually what you want: when we traverse the instuctions, we
want to know that the inputs are dead.
|
|
|
|
|
|
|
|
| |
regular CSE.
The CSE case is totally different: since both children use the same
pseudos, there can be no question that a common parent wouldn't
have that pseudo live.
|
|
|
|
|
|
|
|
|
|
| |
The "constant conditional" stuff in flow simplification is now
handled by the trivial instruction simplification, so the only
thing that remained was the conditional flow based on following
constant PHI-nodes. And that one can be much more effectively
done after liveness analysis, when we can decide to skip even
non-empty blocks if the target we are skipping to doesn't care
about this particular block.
|
| |
|
|
|
|
|
| |
Let's try to make sure that once I get these flow bugs ironed
out they won't come creeping back in.
|
|
|
|
|
|
| |
node re-writing.
We'll want to do it for CSE too.
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
And rename the argument.
|
|
|
|
|
|
| |
And clean up naming while at it ("insn" -> "instruction"). Shorthand
is fine for local things, but when we expose them globally we're
better off typing a few extra characters.
|
|
|
|
|
|
|
| |
track of which instructions use which pseudos.
It also verifies the usage, which shows a few bugs in
structure handling.
|
|
|
|
|
|
|
|
| |
repeating CSE itself.
In particular, some symbol address simplifications imply that
we should repeat symbol simplification, since things may have
improved.
|
|
|
|
|
|
|
|
| |
When done carefully, this allows us to rewrite pseudo usage,
as long as we make sure to fix up all the usage chains.
In particular, we can now simplify memops and turn an access
of a symbol through a pointer into a direct symbol access.
|
|
|
|
|
| |
We want to make sure that we kill them properly, so that
any pseudos they depended on or generated are also killed.
|
|
|
|
| |
Also export "kill_bb()", since others want to use it too.
|
|
|
|
|
|
|
|
|
|
| |
Also, allow marking a pseudo unused by setting it to VOID,
which just disables further renaming of that use. This is
needed to make phi-source instructions (that can be shared
among multiple phi-nodes thanks to CSE) be collectable.
We used to just mark the phi source dead, but that was
wrong, since _another_ phi node might be using it.
|
|
|
|
|
| |
This does branches-to-branches and trivial dead basicblock
removal before CSE (so that CSE can do a better job).
|
|
|
|
|
| |
Instead of using the "convert_load_insn()" that converts them to
OP_LNOP's, which ends up confusing instruction printout horribly.
|
|
|
|
|
|
|
|
| |
This makes us able to CSE stuff where one subexpression
directly dominates another.
But we still don't do any fancy code motion in the non-
dominance case.
|
|
|
|
|
|
|
|
| |
It ain't very smart yet, but give it time.
In particular, right now it gathers information for the
whole function, but it only does the actual replacement
if the instructions are in the same basic block.
|
|
Small files are good. Now "linearize" really just contains the
code that does a straightforward linearization of the tree, and
flow.c contains the stuff that tries to analyse the result.
|