search for: thejit

Displaying 20 results from an estimated 40 matches for "thejit".

2014 Mar 21
3
[LLVMdev] lli crashes when running cpp programs
...ion error. ---------------- lib/ExecutionEngine/JIT/JITEmitter.cpp ------------------------ void *JITEmitter::getPointerToGlobal(GlobalValue *V, void *Reference, bool MayNeedFarStub) { if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V)) return TheJIT->getOrEmitGlobalVariable(GV); if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) return TheJIT->getPointerToGlobal(GA->resolveAliasedGlobal(false)); One possible solution is to let JITEmitter emit a stub for the name like following: @@ -687,8 +687,19 @@ if (GlobalVariab...
2017 Feb 06
3
Kaleidoscope tutorial: comments, corrections and Windows support
...ia CTRL+D on Linux or CTRL+Z and ENTER on Windows)" (Windows users normally don't send EOF characters so they usually don't know this shortcut) 4.3. LLVM Optimization Passes - Code for InitializeModuleAndPassManager: - Remove "Context LLVMContext;" - "TheJIT" comes out of nowhere and thus is not defined in the code of the tutorial user. Setting the data layout could be added in 4.4, as it is at least not required for showing the improved body of "test" - "createBasicAliasAnalysisPass" does not exist anymor...
2019 Aug 07
2
Trouble with ORCv2 Tutorial
...oblem with some tiny changes to the front end to deal with some slight API changes introduced in the JIT tutorial where some functions return Expected. For example, the specific place that this is failing: FnIR->print(errs()); fprintf(stderr, "\n"); - TheJIT->addModule(std::move(TheModule)); + auto add_q = TheJIT->addModule(std::move(TheModule)); + assert(add_q && "HandleDefinition: Error adding a module."); InitializeModuleAndPassManager(); I've looked at a previous thread discussing moving f...
2012 Sep 24
0
[LLVMdev] [llvm-commits] Fwd: Re: [PATCH] Fix for bug in JIT exception table allocation
...skin BufferBegin = SavedBufferBegin; > > 91464 jyasskin BufferEnd = SavedBufferEnd; > > 91464 jyasskin CurBufferPtr = SavedCurBufferPtr; > > 47079 geoffray > > 102865 baldrick if (JITExceptionHandling) { > > 127047 echristo TheJIT->RegisterTable(F.getFunction(), FrameRegister); > > 82418 rnk } > > 47079 geoffray } > > > > Any suggestions as to who would be the best qualified to look at it? > > > > > > > > > > Ciao, Duncan. > > > >...
2019 Aug 08
2
Trouble with ORCv2 Tutorial
...with some >> slight API changes introduced in the JIT tutorial where some functions >> return Expected. For example, the specific place that this is failing: >> >> FnIR->print(errs()); >> fprintf(stderr, "\n"); >> - TheJIT->addModule(std::move(TheModule)); >> + auto add_q = TheJIT->addModule(std::move(TheModule)); >> + assert(add_q && "HandleDefinition: Error adding a module."); >> InitializeModuleAndPassManager(); >> >> >> I...
2010 Feb 07
3
[LLVMdev] Jit singleton
...ld prevent any possible race conditions. Every object (Emitter, Resolver, ResolverState) have now a private member instance of JIT (JIT *Jit). The bugpoint tool is using a extern 'C' function : "getPointerToNamedFunction" to get native pointer on function. This function used the TheJit static pointer. To keep alive this functionality, I have added a static SmallVector<JIT*> JitPool (with its mutex JitPoolLock), which keep pointers of available JIT instance. A new static method on JIT object "getPointerToNamedFunctionOnJitPool" fills the need (iterate over availabl...
2019 Aug 09
2
Trouble with ORCv2 Tutorial
...uced in the JIT tutorial where some functions >> >> return Expected. For example, the specific place that this is failing: >> >> >> >> FnIR->print(errs()); >> >> fprintf(stderr, "\n"); >> >> - TheJIT->addModule(std::move(TheModule)); >> >> + auto add_q = TheJIT->addModule(std::move(TheModule)); >> >> + assert(add_q && "HandleDefinition: Error adding a module."); >> >> InitializeModuleAndPassManager(); >...
2010 Feb 10
0
[LLVMdev] Jit singleton
...itions. > > Every object (Emitter, Resolver, ResolverState) have now a private member > instance of JIT (JIT *Jit). > > The bugpoint tool is using a extern 'C' function : > "getPointerToNamedFunction" to get native pointer on function. This function > used the TheJit static pointer. To keep alive this functionality, I have > added a static SmallVector<JIT*> JitPool (with its mutex JitPoolLock), which > keep pointers of available JIT instance. A new static method on JIT object > "getPointerToNamedFunctionOnJitPool" fills the need (iterat...
2010 Feb 10
1
[LLVMdev] Jit singleton
...(Emitter, Resolver, ResolverState) have now a private member > > instance of JIT (JIT *Jit). > > > > The bugpoint tool is using a extern 'C' function : > > "getPointerToNamedFunction" to get native pointer on function. This > function > > used the TheJit static pointer. To keep alive this functionality, I have > > added a static SmallVector<JIT*> JitPool (with its mutex JitPoolLock), > which > > keep pointers of available JIT instance. A new static method on JIT > object > > "getPointerToNamedFunctionOnJitPool&quo...
2009 Jul 01
0
[LLVMdev] [PATCH][RFC] Bug #4406: stubs for external functions should be registered even if DlsymStubs are disabled
...ough, the AssertingVH is still triggered on destruction of the Module. It turns out that the stub for the external "write" is not registered by JITEmitter::AddStubToCurrentFunction() because DlsymStubs are not enabled. void JITEmitter::AddStubToCurrentFunction(void *StubAddr) { if (!TheJIT->areDlsymStubsEnabled()) return; It seems wrong. From include/llvm/ExecutionEngine/JITMemoryManager.h, my understanding is that DlsymStubs are only necessary in certain situations (like supporting relocations in a different process that the one doing the JIT), and do not have to be enabled...
2009 Jul 03
0
[LLVMdev] Question about memory allocation in JIT
... retryWithMoreMemory(F); > -    return true; > +         for (unsigned i = 0, e = BackupRelocations.size(); i != e; ++i) { > +                 MachineRelocation &MR = BackupRelocations[i]; > +                 if (MR.isGlobalValue()) { > +                         void* ResultPtr = TheJIT->getPointerToGlobalIfAvailable(MR.getGlobalValue()); > +                         if (BufferBegin <= ResultPtr && ResultPtr < BufferEnd) { > +                                 TheJIT->updateGlobalMapping(MR.getGlobalValue(), 0); > +                         } > +      ...
2012 Aug 22
1
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
On Aug 21, 2012, at 2:12 PM, Michael Muller <mmuller at enduden.com> wrote: > > Hi, I found a bug in the code that generates exception tables, I've attached > what I think is the correct fix. > > When you run out of space writing to a buffer, the buffer management code > simply stops writing at the end of the buffer. It is the responsibility of > the caller to
2012 Aug 23
0
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
Eric Christopher wrote: > > On Aug 21, 2012, at 2:12 PM, Michael Muller <mmuller at enduden.com> wrote: > > > > > Hi, I found a bug in the code that generates exception tables, I've attached > > what I think is the correct fix. > > > > When you run out of space writing to a buffer, the buffer management code > > simply stops writing at the
2010 Feb 04
0
[LLVMdev] Jit singleton
In eager compilation mode, I don't know of anything that would go wrong with having multiple JITs in the process. However, in lazy compilation mode, we need to map stub addresses to the JIT that knows how to compile them. Right now, that's done by looking up the static "TheJITResolver" variable and assuming it's the only JIT, but we could 1) use a static DenseMap<stub_address, JITResolver*> instead, or 2) include the JITResolver* inside the stub as an argument to the compilation callback. Nobody's needed this enough to get it working though. I think i...
2008 Mar 30
3
[LLVMdev] Being able to know the jitted code-size before emitting
Hi everyone, vmkit requires to know the size of a jitted method before emitting the method. This allows to allocate the correct size for the method. The attached patch creates this functionality when the flag SizedMemoryCode is on. In order to implement this functionality, i had to virtualize some MachineCodeEmitter functions. Is it OK to commit the patch? Thanks, Nicolas --------------
2010 Feb 04
2
[LLVMdev] Jit singleton
Hi everyone ! If I call ExecutionEngine::createJIT (or EngineBuilder::create) more than one time, the second time fails on a assertion "Multiple JIT resolvers?". It seems that the JIT is designed to be a singleton in the process, and I was wondering if it was something mandatory. How hard will it be to make it a non-singleton object ? Is this a JIT-only problem (work needed on JIT
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
....getConstantPool()); >> + initJumpTableInfo(F.getJumpTableInfo()); >> + >> + // About to start emitting the machine code for the function. >> + emitAlignment(std::max(F.getFunction()->getAlignment(), 8U)); >> + >> + } >> + >> + >> TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); >> >> MBBLocations.clear(); >> @@ -579,12 +614,18 @@ >> DOUT << "Disassembled code:\n" >> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >> (uintptr_t)FnStart); >...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...ool()); > + emitConstantPool(F.getConstantPool()); > + initJumpTableInfo(F.getJumpTableInfo()); > + > + // About to start emitting the machine code for the function. > + emitAlignment(std::max(F.getFunction()->getAlignment(), 8U)); > + > + } > + > + > TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); > > MBBLocations.clear(); > @@ -579,12 +614,18 @@ > DOUT << "Disassembled code:\n" > << sys::disassembleBuffer(FnStart, FnEnd-FnStart, > (uintptr_t)FnStart); > #endif > + > if...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...initJumpTableInfo(F.getJumpTableInfo()); >>> + >>> + // About to start emitting the machine code for the function. >>> + emitAlignment(std::max(F.getFunction()->getAlignment(), 8U)); >>> + >>> + } >>> + >>> + >>> TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); >>> >>> MBBLocations.clear(); >>> @@ -579,12 +614,18 @@ >>> DOUT << "Disassembled code:\n" >>> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >>> (uintp...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...ableInfo()); >>>> + >>>> + // About to start emitting the machine code for the function. >>>> + emitAlignment(std::max(F.getFunction()->getAlignment(), 8U)); >>>> + >>>> + } >>>> + >>>> + >>>> TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); >>>> >>>> MBBLocations.clear(); >>>> @@ -579,12 +614,18 @@ >>>> DOUT << "Disassembled code:\n" >>>> << sys::disassembleBuffer(FnStart, FnEnd-FnStart,...