search for: allocatespace

Displaying 20 results from an estimated 37 matches for "allocatespace".

Did you mean: allocatepage
2008 Oct 16
2
[LLVMdev] bug in the JIT global variable emitter
> + /// allocateSpace - reserves space in the current block if any, or > + /// allocate a new one of the given size + virtual void > *allocateSpace(intptr_t Size, unsigned Alignment); + > Please capitalize "reserves". ok. > + /// allocateSpace - general-purpose space allocator > Better commen...
2008 Oct 16
0
[LLVMdev] bug in the JIT global variable emitter
Thanks Nuno and Dale. Some comments: + /// allocateSpace - reserves space in the current block if any, or + /// allocate a new one of the given size + virtual void *allocateSpace(intptr_t Size, unsigned Alignment); + Please capitalize "reserves". + /// allocateSpace - general-purpose space allocator Better comments please. :-) Also please end...
2008 Oct 16
2
[LLVMdev] bug in the JIT global variable emitter
...;t update the data structures the JITEmitter relies > on. In the usual case, the JITEmitter calls into JIT and updates its > own data structures, so that case works fine. exactly! :) Thank you for summarizing. I hope others can now follow this description. > I think adding a smarter allocateSpace to JITEmitter is the right > general idea, and your patch looks OK. I'd like to get another pair > of eyes on it though, as I find this area not straightfoward:) Please > run the testsuite before committing. Yes, I would also appreciate more reviewers. The JIT's code is particu...
2008 Oct 16
0
[LLVMdev] bug in the JIT global variable emitter
On Oct 16, 2008, at 11:29 AM, Nuno Lopes wrote: >> + /// allocateSpace - reserves space in the current block if any, or >> + /// allocate a new one of the given size + virtual void >> *allocateSpace(intptr_t Size, unsigned Alignment); + >> Please capitalize "reserves". > > ok. > > >> + /// allocateSpace - general-purpose s...
2009 Oct 06
1
[LLVMdev] 2.6/trunk Execution Engine question
On Tue, Oct 6, 2009 at 5:49 PM, Reid Kleckner <rnk at mit.edu> wrote: >> Also, the null pointer is coming from a call to JCE->allocateSpace(). >> This is a virtual function; I'm trying to discover what subclass it >> is. > > So, there's JITEmitter::allocateSpace which overrides > JITCodeEmitter::allocateSpace(), but *most* of the time it just calls > JITCodeEmitter::allocateSpace().  In particular, it do...
2009 Oct 06
4
[LLVMdev] 2.6/trunk Execution Engine question
> 6. When ExecutionEngine::create was called with parameter > "GVsWithCode" set to its default value of true, I got a segfault when > trying to get a pointer to one of my globals.  JIT::getMemoryForGV was > returning NULL in that case.  Explicitly passing false for > "GVsWithCode" cleared it up. That's no good. Could you send me a stack trace and explain
2009 Dec 25
1
[LLVMdev] JIT buffer code skipping 8 bytes?
...rray trick seems to work ... sort of. My question though is: 1) In JITDwarfEmitter.cpp these GlobalVariables are emitted with: JCE->emitInt64((intptr_t)Jit.getOrEmitGlobalVariable(GV)); (in JITDwarfEmitter::EmitExceptionTable) 2) The allocated emitted space is calculated by: JITCodeEmitter::allocateSpace(...) as eventually called by getOrEmitGlobalVariable(...) 3) If the correctly sized buffer was already allocated, and alignment did not affect the current buffer pointer, JITCodeEmitter::allocateSpace(...) returns the current buffer pointer (CurBufferPtr), BEFORE this pointer is offset by the size...
2013 Oct 01
2
[LLVMdev] JITMemoryManager
...gnment); } virtual void endFunctionBody(const llvm::Function *F, uint8_t *FunctionStart, uint8_t *FunctionEnd) { return mgr()->endFunctionBody(F, FunctionStart, FunctionEnd); } virtual uint8_t *allocateSpace(intptr_t Size, unsigned Alignment) { return mgr()->allocateSpace(Size, Alignment); } virtual uint8_t *allocateGlobal(uintptr_t Size, unsigned Alignment) { return mgr()->allocateGlobal(Size, Alignment); } virtual void deallocateFunctionBody(void *Body)...
2008 Nov 22
2
[LLVMdev] MachineCodeEmitter Patch
...I have fixed this bug by adding an additional check after all relocations have been completed. In the process of fixing this bug, I happened to look through the code in MachineCodeEmitter.h. The buffer size checks in MachineCodeEmitter.h all suffer from an integer overflow bug. For example in allocateSpace the code reads: // Allocate the space. CurBufferPtr += Size; // Check for buffer overflow. if (CurBufferPtr >= BufferEnd) { This is wrong because Size + CurBufferPtr can cause an integer overflow and thus appear to be less than BufferEnd. The correct way to check for th...
2008 Nov 22
3
[LLVMdev] MachineCodeEmitter Patch
...dditional check after all relocations have been completed. >> In the process of fixing this bug, I happened to look through the code >> in MachineCodeEmitter.h. The buffer size checks in >> MachineCodeEmitter.h all suffer from an integer overflow bug. For >> example in allocateSpace the code reads: >> >> // Allocate the space. >> CurBufferPtr += Size; >> >> // Check for buffer overflow. >> if (CurBufferPtr >= BufferEnd) { >> >> This is wrong because Size + CurBufferPtr can cause an integer >> overflow and...
2013 Oct 02
0
[LLVMdev] JITMemoryManager
...virtual void endFunctionBody(const llvm::Function *F, > uint8_t *FunctionStart, > uint8_t *FunctionEnd) { > return mgr()->endFunctionBody(F, FunctionStart, FunctionEnd); > } > virtual uint8_t *allocateSpace(intptr_t Size, unsigned Alignment) { > return mgr()->allocateSpace(Size, Alignment); > } > virtual uint8_t *allocateGlobal(uintptr_t Size, unsigned Alignment) { > return mgr()->allocateGlobal(Size, Alignment); > } > virtual void deallocate...
2013 Oct 02
3
[LLVMdev] JITMemoryManager
...unctionBody(const llvm::Function *F, >> uint8_t *FunctionStart, >> uint8_t *FunctionEnd) { >> return mgr()->endFunctionBody(F, FunctionStart, FunctionEnd); >> } >> virtual uint8_t *allocateSpace(intptr_t Size, unsigned Alignment) { >> return mgr()->allocateSpace(Size, Alignment); >> } >> virtual uint8_t *allocateGlobal(uintptr_t Size, unsigned Alignment) { >> return mgr()->allocateGlobal(Size, Alignment); >> } >>...
2013 Nov 25
2
[LLVMdev] MCJIT RemoteMemoryManager Failures on ARM
...you guys because you seem to know what should and what shouldn't work, given your recent changes to the XFAILs. Feel free to exclude yourselves, or include other folks. I'm having a problem with a self-hosting ARM bot described here: http://llvm.org/bugs/show_bug.cgi?id=18057 Basically, allocateSpace() sometimes works, sometimes doesn't. I couldn't see much wrong with the code, and the call graph looks valid, so I'm guessing it's something in the higher logic (message passing) that is non-deterministically failing. I even tried to run manually several times in a row and sometim...
2008 Nov 22
0
[LLVMdev] MachineCodeEmitter Patch
...> adding an additional check after all relocations have been completed. > In the process of fixing this bug, I happened to look through the code > in MachineCodeEmitter.h. The buffer size checks in > MachineCodeEmitter.h all suffer from an integer overflow bug. For > example in allocateSpace the code reads: > > // Allocate the space. > CurBufferPtr += Size; > > // Check for buffer overflow. > if (CurBufferPtr >= BufferEnd) { > > This is wrong because Size + CurBufferPtr can cause an integer > overflow and thus appear to be less than BufferE...
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 --------------
2008 Oct 15
0
[LLVMdev] bug in the JIT global variable emitter
...es the MachineCodeEmitter directly. Thus, if you call it from outside the JITEmitter, it won't update the data structures the JITEmitter relies on. In the usual case, the JITEmitter calls into JIT and updates its own data structures, so that case works fine. I think adding a smarter allocateSpace to JITEmitter is the right general idea, and your patch looks OK. I'd like to get another pair of eyes on it though, as I find this area not straightfoward:) Please run the testsuite before committing. Thanks for analyzing this and the test case. > The problem only happens when ca...
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...); >> + unsigned Size = CPE.Offset; >> + const Type *Ty = CPE.isMachineConstantPoolEntry() >> + ? CPE.Val.MachineCPVal->getType() : CPE.Val.ConstVal->getType(); >> + Size += Fn->getTarget().getTargetData()->getABITypeSize(Ty); >> + ConstantPoolBase = allocateSpace(Size, 1 << MCP- >> >>> getConstantPoolAlignment()); >>> >> + ConstantPool = MCP; >> +} >> + >> +void SizeEmitter::initJumpTableInfo(MachineJumpTableInfo *MJTI) { >> + const std::vector<MachineJumpTableEntry> &JT =...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...PE = Constants.back(); > + unsigned Size = CPE.Offset; > + const Type *Ty = CPE.isMachineConstantPoolEntry() > + ? CPE.Val.MachineCPVal->getType() : CPE.Val.ConstVal->getType(); > + Size += Fn->getTarget().getTargetData()->getABITypeSize(Ty); > + ConstantPoolBase = allocateSpace(Size, 1 << MCP- > >getConstantPoolAlignment()); > + ConstantPool = MCP; > +} > + > +void SizeEmitter::initJumpTableInfo(MachineJumpTableInfo *MJTI) { > + const std::vector<MachineJumpTableEntry> &JT = MJTI- > >getJumpTables(); > + if (JT.empty()) r...
2008 Dec 08
0
[LLVMdev] MachineCodeEmitter Patch
...r all relocations have been >>> completed. In the process of fixing this bug, I happened to look >>> through the code in MachineCodeEmitter.h. The buffer size checks >>> in MachineCodeEmitter.h all suffer from an integer overflow bug. >>> For example in allocateSpace the code reads: >>> >>> // Allocate the space. >>> CurBufferPtr += Size; >>> // Check for buffer overflow. >>> if (CurBufferPtr >= BufferEnd) { >>> >>> This is wrong because Size + CurBufferPtr can cause an integer >&g...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...CPE.Offset; >>> + const Type *Ty = CPE.isMachineConstantPoolEntry() >>> + ? CPE.Val.MachineCPVal->getType() : CPE.Val.ConstVal- >>> >getType(); >>> + Size += Fn->getTarget().getTargetData()->getABITypeSize(Ty); >>> + ConstantPoolBase = allocateSpace(Size, 1 << MCP- >>> >>>> getConstantPoolAlignment()); >>>> >>> + ConstantPool = MCP; >>> +} >>> + >>> +void SizeEmitter::initJumpTableInfo(MachineJumpTableInfo *MJTI) { >>> + const std::vector<MachineJumpTableE...