| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Signed-off-by: David Given <dg@cowlark.com>
[negative value division fixed by alexey.zaytsev@gmal.com]
Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
|
|
|
|
| |
Signed-off-by: Josh Triplett <josh@freedesktop.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expose the FORMAT_ATTR portability macro in lib.h, and use it on the various
printf-like functions in sparse.
Add a new SENTINEL_ATTR portability macro for the GCC sentinel attribute, and
use it on match_idents in parse.c.
match_oplist in expression.c should use SENTINEL_ATTR, but GCC does not accept
an integer 0 as a sentinel, only a pointer 0 like NULL.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
|
|
|
|
| |
Signed-off-by: Josh Triplett <josh@freedesktop.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The liveness instruction takes up about 10% of the bytecode bloat file.
It is not very useful, it is duplicate information that can be obtained
from the def/user chain.
This change disables the liveness instruction by default.
The caller can track_pseudo_death() if needed.
Signed-Off-By: Christopher Li <sparse@chrisli.org>
|
|
|
|
| |
Signed-off-by: Josh Triplett <josh@freedesktop.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The sparse interface is a kind of snaky that it change the input argument
array. The function sparse() does the same hack just to skip the files.
This patch add the ptr list for string. So sparse_initialize will
return list of file to compile. The string pointer is not aligned
at word boundary. This patch introduce non taged version of the ptr
list iteration function.
Signed-off-by: Christopher Li <sparse@chrisli.org>
|
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Josh Triplett <josh@freedesktop.org>
|
|
|
|
|
| |
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@looxix.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Toto, I have a feeling We're not in SSA land any more.
(Not that it really helps. The example compiler not only had SSA
assumptions, it also depended on liveness information and insn->def
state, both of which are destroyed by the un-ssa phase. So this is
really a small bandage around a much larger problem, and doesn't really
fix anything fundamental).
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
|
|
|
|
|
| |
Yeah, this probably breaks the example in a totally _different_ way than
it was broken before ;)
But it's certainly no worse than before. At least not much.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
|
|
| |
Noted by Mitesh Shah
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Start off with
sparse_initialize(argc, argv);
which will return the number of filenames found. You can then use that,
or just check if *argv is NULL in a loop like
while (*argv)
list = sparse(argv);
where you get the declaration list for each file in turn.
|
| |
|
|
|
|
| |
to the return register state.
|
|
|
|
| |
value that is contained within.
|
|
|
|
| |
about addresses of local variables.
|
|
|
|
|
|
|
| |
This is OP_MUL/OP_DIV/OP_MOD/OP_SHR.
We actually do the constant simplifications still wrong, but
now the information is all there.
|
|
|
|
| |
doing unnecessary register->sameregister moves.
|
|
|
|
|
|
| |
address of a symbol.
Not quite there..
|
|
|
|
| |
it meant "contains a pseudo".
|
|
|
|
|
|
| |
Take argument type into account (somewhat), and do a first
(broken, but it's a good example) cut at having different
calling conventions for different kinds of functions.
|
|
|
|
|
|
|
| |
register right now.
Change users that just wanted to test for "empty" to check that
"reg->contains" is NULL instead.
|
|
|
|
|
|
|
| |
using static strings.
If we ever want to generate more abstract output (and we do), we
can't just have strings.
|
|
|
|
|
|
|
| |
(symbol addresses).
They are pretty different. Symbol addresses have special meaning during
various phases, from symbol simplification to CSE.
|
|
|
|
|
|
|
| |
by a parent as outputs as unavailable as an input register.
The parent won't be able to write two different pseudos to the
same register..
|
|
|
|
|
| |
We could make the internal per-bb allocations be
local, though. That would require some more care.
|
|
|
|
|
|
|
| |
the outgoing pseudos.
This caused us to then possibly double-allocate that register
later for another pseudo..
|
|
|
|
| |
to the outputs.
|
|
|
|
|
| |
I totally botch the constraints handling, but hey, it's just
an example.
|
| |
|
|
|
|
|
|
|
| |
return NULL from find_pseudo_storage().
That way the caller won't bother to move the register to
itself - it sees that it has no separate storage.
|
|
|
|
|
|
|
|
| |
We could make it deeper if we wanted to combine conditionals,
but one-deep is good enough to catch the common "setXX + brcc"
thing, and thus makes the conditional branches MUCH more readable.
This also moves things around a bit to help organization.
|
|
|
|
| |
They otherwise get drowned out by the _real_ comments.
|
|
|
|
| |
Just the infrastructure.
|
| |
|
|
|
|
| |
In particular, casts to a smaller type doesn't need to do anything.
|
|
|
|
|
| |
It can select the order based on whether one of the sources
is dead, or on the target register choice.
|
|
|
|
|
|
|
|
|
| |
This allows us to mark a register dead when we load it from dead
backing store.
NOTE! This all sounds nonsensical, but we mark things "dead" _before_
the last use, not after. So dead means not that it's gone, it means
that this use is the last one.
|
|
|
|
|
|
|
| |
rather than the storage itself.
I'll want to mark the hash entry dead when marking the pseudo
dead, and this allows me to use the common helper routine.
|
|
|
|
|
|
|
|
|
|
| |
pseudo into a routine of its own.
Cleaner and more readable.
This also allows us to be a lot better at the "generic"
inputs (aka gcc "g" specifier), since it can now just look
up the storage instead of having to load it into a register.
|
|
|
|
|
|
|
| |
issues:
- argument passign setup
- return value storage
- silly switch register hack.
|
|
|
|
| |
That allows us to re-use the sources if they have died.
|
|
|
|
|
|
|
| |
This makes it much easier to look at the real state of a register:
- busy == 0 means no users
- busy == dead means all users are dead
- dead != 0 means that we should clean it
|
| |
|
|
|
|
|
| |
You know the drill by now. It's not so much correct, as it is
"kind of looks right".
|
|
|
|
| |
Yeah, yeah, it's still pretty stupid.
|
|
|
|
|
| |
No sign extension, no nuffink. My opcode generation gets
worse and worse.
|
|
|
|
| |
Just real enough to make it look good.
|
|
|
|
|
|
| |
We get those when encountering unimplemented instructions, since
then we'll have bad register contents. Let's just silently ignore
it for now.
|