[LLVMdev] Re: Newbie questions

Chris Lattner sabre at nondot.org
Wed Apr 26 09:59:34 PDT 2006

On Wed, 26 Apr 2006, Tom Tromey wrote:
> My plan for this in my JIT is to just recompile the bytecode for the
> function after class initializations, constant pool resolutions, and
> the like.  This is somewhat crude, but seems like it should work fine.
> The full plan is to have some kind of heuristic so we don't go around
> recompiling functions that are rarely called.

I think this makes the most sense.  In a static compilation environment, 
unless you can prove some sort of ordering, you have little choice but to 
do dynamic checks.  In a JIT environment, you don't :)

> Archie> I.e., my question is the more general one:
> Archie> how do optimizations that are specific to the front-end language get
> Archie> done? How does the front-end "secret knowledge" get passed through
> Archie> somehow so it can be used for optimization purposes?
> I was thinking that I would write some extra JVM-specific LLVM passes
> and add them to the pass manager I construct.
> I haven't started this, so I have no idea how I would handle passing
> the information back and forth.

This approach should work fine.  There are multiple different approaches 
you can take, when you start digging in and have specific questions or 
needs, let us know!



More information about the llvm-dev mailing list