Will Dietz
2010-Sep-29 18:28 UTC
[LLVMdev] LLVM JIT--Function Specialization and Stack rewriting
Hi all, I'm looking at using LLVM to do some dynamic transforms of code, and was wondering if someone could comment on the current status of how LLVM handles function specialization, in particular how it updates/rewrites existing (previously emitted) code (possibly rewriting stack of currently executing threads as appropriate). Does anything like this already exist? Are there projects that do anything similar? Or if someone has any thoughts on how one might accomplish such a thing in LLVM, I would certainly appreciate hearing them :). I'm okay making it architecture specific, at least for now. Thank you for your time, ~Will
Eric Christopher
2010-Oct-06 06:57 UTC
[LLVMdev] LLVM JIT--Function Specialization and Stack rewriting
On Sep 29, 2010, at 11:28 AM, Will Dietz wrote:> I'm looking at using LLVM to do some dynamic transforms of code, and > was wondering if someone could comment on the current status of how > LLVM handles function specialization, in particular how it > updates/rewrites existing (previously emitted) code (possibly > rewriting stack of currently executing threads as appropriate). > > Does anything like this already exist? Are there projects that do > anything similar?Pretty much you'll need to do all of this by hand, though the APIs that exist in the JIT and Module classes should be sufficient to do this. You'll probably want to save on the client side the addresses for individual functions. -eric