[LLVMdev] ModuleProvider materializeFunction

Carter Cheng carter_cheng at yahoo.com
Tue Jul 7 00:21:34 PDT 2009

Thanks for the reply. I actually managed to resolve this problem mostly to my satisfaction. I suspect based on your description of materializeFunction I may be best served by subclassing the ModuleProvider to do what I want.

Thanks again.

--- On Mon, 7/6/09, Chris Lattner <clattner at apple.com> wrote:

> From: Chris Lattner <clattner at apple.com>
> Subject: Re: [LLVMdev] ModuleProvider materializeFunction
> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Date: Monday, July 6, 2009, 10:27 PM
> On Jul 4, 2009, at 5:59 AM, Carter
> Cheng wrote:
> > I have tracing the calls to materializeFunction in the
> LLVM code in  
> > hopes of determining how to properly utilize this
> function but from  
> > my explorations I gather it's just a hook which is
> called by the JIT  
> > system and I would mostly have to do the work myself.
> ModuleProvider is a very simple concept.  You can
> either load an  
> entire module at once (e.g. with ParseBitcodeFile) or you
> can load  
> just the outline and load functions on demand (with  
> getBitcodeModuleProvider).  This allows clients to
> lazily load  
> functions as they are needed instead of loading everything
> off the  
> disk.  The JIT is one example that knows how to use
> this, it lazily  
> loads functions the first time a function is called or its
> address is  
> taken.
> > What is the preferred way to inject a llvm:Function
> which contains  
> > basic blocks into the Module + JIT? My understanding
> (perhaps  
> > erroneous) from some experimentation that modifying
> the module by  
> > inserting functions into it after you have created the
> EE does not  
> > automatically update the EE.
> What kind of update of the EE do you want?
> -Chris
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu 
>        http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


More information about the llvm-dev mailing list