search for: moduleprovid

Displaying 20 results from an estimated 115 matches for "moduleprovid".

Did you mean: moduleprovider
2008 May 12
2
[LLVMdev] Python bindings available.
> Consider the case where a function creates and populates a Module, stuffs it > in an ExistingModuleProvider for the JIT, then returns the ModuleProvider, > dropping direct reference to the Module. (ModuleProvider takes ownership of > the Module.) I presume that your Python object is under the impression it > owns the Module; when that goes out of scope, its refcount goes to zero and > it in...
2008 May 12
0
[LLVMdev] Python bindings available.
On May 12, 2008, at 02:58, Mahadevan R wrote: >> Consider the case where a function creates and populates a Module, >> stuffs it in an ExistingModuleProvider for the JIT, then returns >> the ModuleProvider, dropping direct reference to the Module. >> (ModuleProvider takes ownership of the Module.) I presume that your >> Python object is under the impression it owns the Module; when that >> goes out of scope, its refcoun...
2009 Jul 07
1
[LLVMdev] ModuleProvider materializeFunction
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.ui...
2009 Jul 07
0
[LLVMdev] ModuleProvider materializeFunction
...ng 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 everythin...
2009 Jul 04
4
[LLVMdev] ModuleProvider materializeFunction
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. What is the preferred way to inject a llvm:Function which contains basic blocks into the Module + JIT? My understanding (perhaps
2008 May 12
2
[LLVMdev] Python bindings available.
On Mon, May 12, 2008 at 7:55 PM, Gordon Henriksen <gordonhenriksen at mac.com> wrote: > On May 12, 2008, at 02:58, Mahadevan R wrote: > > >> Consider the case where a function creates and populates a Module, > >> stuffs it in an ExistingModuleProvider for the JIT, then returns > >> the ModuleProvider, dropping direct reference to the Module. > >> (ModuleProvider takes ownership of the Module.) I presume that your > >> Python object is under the impression it owns the Module; when that > >> goes out of sc...
2008 May 12
0
[LLVMdev] Python bindings available.
...tomatic finalizers like this one are very dangerous when cooperating with the C++ object model: void dtor_LLVMModuleRef(void *p) { LLVMModuleRef m = (LLVMModuleRef)p; LLVMDisposeModule(m); } Consider the case where a function creates and populates a Module, stuffs it in an ExistingModuleProvider for the JIT, then returns the ModuleProvider, dropping direct reference to the Module. (ModuleProvider takes ownership of the Module.) I presume that your Python object is under the impression it owns the Module; when that goes out of scope, its refcount goes to zero and it invokes its dt...
2009 Jul 04
0
[LLVMdev] ModuleProvider materializeFunction
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. > > What is the preferred way to inject a llvm:Function which contains basic blocks into the Module +
2009 Oct 19
3
[LLVMdev] Objective-C code in lli
...r(int) + 470 1 libSystem.B.dylib 0x00007fff83ee10aa _sigtramp + 26 2 libSystem.B.dylib 0x0000000100a0b4ba _sigtramp + 2092082218 3 lli 0x00000001001e8374 llvm::ExecutionEngine::emitGlobals() + 6164 4 lli 0x00000001001dbd69 llvm::Interpreter::Interpreter (llvm::ModuleProvider*) + 185 5 lli 0x00000001001dbdd8 llvm::Interpreter::create (llvm::ModuleProvider*, std::string*, bool) + 56 6 lli 0x0000000100010803 main + 243 7 lli 0x00000001000106e8 start + 52 -------------- next part -------------- An HTML attachment was scru...
2007 Jul 15
2
[LLVMdev] JIT Leaks?
...Function *F = cast<Function>(M->getOrInsertFunction("F", Type::Int32Ty, (Type*)0)); BasicBlock *BB = new BasicBlock("BB",F); new ReturnInst( ConstantInt::get(Type::Int32Ty,1), BB ); std::vector<GenericValue> Args(0); ExistingModuleProvider *MP = new ExistingModuleProvider(M); ExecutionEngine *EE = ExecutionEngine::create(MP, false); GenericValue GV = EE->runFunction(F, Args); delete EE; } } The memory goes up, and OS X leaks command returns pages of: Leak: 0x011036b0 size=16 0x00000000...
2009 Jul 23
1
[LLVMdev] Possible change to ExecutionEngine::create()
...ine::create()? I would like to be able to disable the automatic enumeration of loaded modules, and the subsequent searching for undefined symbols (using SearchForAddressOfSymbol). I propose adding an extra parameter to the function definition, defaulting to true. static ExecutionEngine *create(ModuleProvider *MP, bool ForceInterpreter = false, std::string *ErrorStr = 0, bool Fast = false, bool EnumModules = true); And corresponding change to the function. ExecutionEngi...
2008 Mar 04
1
[LLVMdev] [PATCH] Prefer to use *.opt ocaml executables as they are more efficient.
I noticed that the ocaml compilation isn't using the .opt executables if they're available. We might gain a slight optimization in ocaml compile time by optionally using them with this patch. --- autoconf/configure.ac | 18 +++++ configure | 195 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 188 insertions(+), 25 deletions(-) -------------- next part
2008 Mar 04
0
[LLVMdev] [PATCH] Cleanup the c and ocaml binding documentation.
...t; */ > typedef struct LLVMOpaqueTypeHandle *LLVMTypeHandleRef; > > @@ -70,12 +70,12 @@ typedef struct LLVMOpaqueBasicBlock > *LLVMBasicBlockRef; > typedef struct LLVMOpaqueBuilder *LLVMBuilderRef; > > /* Used to provide a module to JIT or interpreter. > - * See the llvm::ModuleProvider class. > + * See the [llvm::ModuleProvider] class. > */ > typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef; > > /* Used to provide a module to JIT or interpreter. > - * See the llvm::MemoryBuffer class. > + * See the [llvm::MemoryBuffer] class. > */ > ty...
2008 Mar 04
1
[LLVMdev] [PATCH] Cleanup the c and ocaml binding documentation.
--- bindings/ocaml/llvm/llvm.ml | 2 +- bindings/ocaml/llvm/llvm.mli | 2 +- bindings/ocaml/llvm/llvm_ocaml.c | 2 +- include/llvm-c/Core.h | 32 +++++++++++++++++++------------- 4 files changed, 22 insertions(+), 16 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: 316a84e85ed2363551149e65a227c8e7c8192624.diff Type:
2007 Jul 15
0
[LLVMdev] JIT Leaks?
...t<Function>(M->getOrInsertFunction("F", > Type::Int32Ty, (Type*)0)); > BasicBlock *BB = new BasicBlock("BB",F); > new ReturnInst( ConstantInt::get(Type::Int32Ty,1), BB ); > std::vector<GenericValue> Args(0); > ExistingModuleProvider *MP = new ExistingModuleProvider(M); > ExecutionEngine *EE = ExecutionEngine::create(MP, false); > GenericValue GV = EE->runFunction(F, Args); > delete EE; > } > } > > The memory goes up, and OS X leaks command returns pages of: > > Leak:...
2010 Feb 11
2
[LLVMdev] LLVM memory usage?
...load successive pages and watch top, my RSS size increases by roughly 40 times the on disk size of the loaded bit code for each loaded module, which I take to mean I have a massive leak. I'm probably just not freeing stuff that I ought to but I don't know what - deleting the MemoryBuffer or ModuleProvider results in a SEGV. I've read the doxygen docs but I'm not clear what objects have allocated what memory for what purpose, what can be freed once all functions in a module have been compiled or how to do this. I'd be grateful if anyone could tell me what I'm doing wrong or point m...
2009 Jul 23
2
[LLVMdev] proposed new rule for getelementptr
On Jul 22, 2009, at 5:23 PM, Chris Lattner wrote: > > On Jul 22, 2009, at 1:32 PM, Dan Gohman wrote: > >>>> >>>> - A null pointer is associated with no addresses. >>>> >>> >>> A null pointer in address space 0. >> >> I'm not fond of weird address-space semantics, but for consistency >> with what the optimizer is
2009 Jul 23
0
[LLVMdev] Possible change to ExecutionEngine::create()
...> (using SearchForAddressOfSymbol). > > I propose adding an extra parameter to the function definition, > defaulting to true. I'd rather not. The current API is messy enough already. Is there not another way to solve the problem? Evan > > static ExecutionEngine *create(ModuleProvider *MP, > bool ForceInterpreter = false, > std::string *ErrorStr = 0, > bool Fast = false, > bool EnumModules = true); > > And corresponding change to the...
2009 Oct 06
0
[LLVMdev] 2.6/trunk Execution Engine question
...e the globals with the > functions. > That was it! The following small test program crashes in getPointerToGlobal: #include "llvm/Module.h" #include "llvm/Function.h" #include "llvm/InlineAsm.h" #include "llvm/Support/IRBuilder.h" #include "llvm/ModuleProvider.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/Support/raw_os_ostream.h" #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetSelect.h" #include "llvm/ExecutionEngi...
2008 May 10
4
[LLVMdev] Python bindings available.
Hi all, I'd like to announce the availability of Python bindings for LLVM. It is built over llvm-c, and currently exposes enough APIs to build an in-memory IR (and dump it!). It needs LLVM 2.3 latest and Python 2.5 (2.4 should be sufficient, but I haven't tested). Tested only on Linux/i386. Would love to hear your comments. [Needless to say, it's all work in progress, but mostly it