On Sun, Nov 1, 2009 at 2:52 PM, Rémi Forax <[email protected]> wrote:
> I wonder if a SSA-based compiler IR is a good idea,
> you will need something like a back transformation
> to come back to a bytecode form (without phis).
> And as far as I know, the transformation that you can do
> on a SSA form are low levels i.e you will have lot
> of informations but no way to encode them in the bytecode.
>
> Moreover in case of JRuby you have a lot more than
> just types, you can do some kind of type profiling because
> your code need first to be interpreted.
> And so you can propage these informations to your bytecode
> compiler.

The SSA transformations in the absence of profiling are to help us
reduce literal fixnum loops into int loops, fixnum math into primitive
math, and so on. Obviously these cases only work if we can statically
detect the types of values and make assumptions (or add guards) for
numeric operators. But we also plan to add type profiling to our
interpreter (or make the current compiler a first-tier compiler) so we
can feed profile data into the compiler. With that, we can potentially
produce an optimized version of a given method body that runs its
guards ahead of time and then goes straight to optimized behavior.
There are some guards we can never eliminate, but we can get rid of a
lot of the current overhead of Fixnum objects if we can tell we're
using Fixnums and numeric operators have not been modified.

- Charlie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to