> Not that the translated code looks all that great yet,
> but using an optimising compiler backend is exactly
> the way to go. You can tell from the comments that he
> is handling a proper data flow graph which should
> allow for global optimisation (the clue is the
> references to 'phi nodes', which won't mean much
> unless you've done some advanced compiler reading)
As far as I understand it, SSA is part of LLVM so using
LLVM provides you with SSA optimised code for free,
which is good.
On the other hand, I prefer a translation that I can
easily relate to the original code. Of course flags
removal is a must to make the translated code
readable. Then the host compiler can do whatever
kind of optimisations it can. I have a project in
mind to use QEMU for that (of course that'd be for
recent processors).
> I thought it might be fun
> to push it through Orion and see what it looks like.
> There are a couple of partial disassemblies of apple1
> basic out there already (although reportedly not 100%
> accurate copies of the code) which will give most of
> the labels and jumps.
Yeah might be fun :-) I have lost all links to Orion
download (I changed my machine a few months ago and was
too lazy to backup files...).
Laurent