search for: bufferbegin

Displaying 20 results from an estimated 30 matches for "bufferbegin".

2012 Sep 24
0
[LLVMdev] [llvm-commits] Fwd: Re: [PATCH] Fix for bug in JIT exception table allocation
...ks, Duncan - > > > > > Hi Michael, > > > > > > > --- lib/ExecutionEngine/JIT/JITEmitter.cpp (revision 163478) > > > > +++ lib/ExecutionEngine/JIT/JITEmitter.cpp (working copy) > > > > @@ -974,14 +974,24 @@ > > > > SavedBufferBegin = BufferBegin; > > > > SavedBufferEnd = BufferEnd; > > > > SavedCurBufferPtr = CurBufferPtr; > > > > + uint8_t *FrameRegister; > > > > > > > > - BufferBegin = CurBufferPtr = > > > > MemMgr->startExceptionTabl...
2012 Aug 21
2
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
...--------- next part -------------- Index: lib/ExecutionEngine/JIT/JITEmitter.cpp =================================================================== --- lib/ExecutionEngine/JIT/JITEmitter.cpp (revision 162311) +++ lib/ExecutionEngine/JIT/JITEmitter.cpp (working copy) @@ -974,14 +974,24 @@ SavedBufferBegin = BufferBegin; SavedBufferEnd = BufferEnd; SavedCurBufferPtr = CurBufferPtr; + uint8_t *FrameRegister; - BufferBegin = CurBufferPtr = MemMgr->startExceptionTable(F.getFunction(), - ActualSize); - BufferEnd = BufferB...
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
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 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...MachineConstantPool *ConstantPool; >> + MachineJumpTableInfo *JumpTable; >> + std::vector<intptr_t> LabelLocations; >> + MachineCodeEmitter* MCE; >> + >> +public: >> + SizeEmitter(MachineCodeEmitter* mce) { >> + CurBufferPtr = 0; >> + BufferBegin = 0; >> + BufferEnd = (unsigned char*)-1; >> + MCE = mce; >> + } >> + >> + SizeEmitter(std::vector<intptr_t> locations) { >> + LabelLocations = locations; >> + CurBufferPtr = 0; >> + BufferBegin = 0; >> + BufferEnd = (u...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...+ void* JumpTableBase; > + MachineConstantPool *ConstantPool; > + MachineJumpTableInfo *JumpTable; > + std::vector<intptr_t> LabelLocations; > + MachineCodeEmitter* MCE; > + > +public: > + SizeEmitter(MachineCodeEmitter* mce) { > + CurBufferPtr = 0; > + BufferBegin = 0; > + BufferEnd = (unsigned char*)-1; > + MCE = mce; > + } > + > + SizeEmitter(std::vector<intptr_t> locations) { > + LabelLocations = locations; > + CurBufferPtr = 0; > + BufferBegin = 0; > + BufferEnd = (unsigned char*)-1; > + } > + &...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...ol; >>> + MachineJumpTableInfo *JumpTable; >>> + std::vector<intptr_t> LabelLocations; >>> + MachineCodeEmitter* MCE; >>> + >>> +public: >>> + SizeEmitter(MachineCodeEmitter* mce) { >>> + CurBufferPtr = 0; >>> + BufferBegin = 0; >>> + BufferEnd = (unsigned char*)-1; >>> + MCE = mce; >>> + } >>> + >>> + SizeEmitter(std::vector<intptr_t> locations) { >>> + LabelLocations = locations; >>> + CurBufferPtr = 0; >>> + BufferBegin =...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...umpTableInfo *JumpTable; >>>> + std::vector<intptr_t> LabelLocations; >>>> + MachineCodeEmitter* MCE; >>>> + >>>> +public: >>>> + SizeEmitter(MachineCodeEmitter* mce) { >>>> + CurBufferPtr = 0; >>>> + BufferBegin = 0; >>>> + BufferEnd = (unsigned char*)-1; >>>> + MCE = mce; >>>> + } >>>> + >>>> + SizeEmitter(std::vector<intptr_t> locations) { >>>> + LabelLocations = locations; >>>> + CurBufferPtr = 0; &gt...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...::vector<intptr_t> LabelLocations; >>>>>> + MachineCodeEmitter* MCE; >>>>>> + >>>>>> +public: >>>>>> + SizeEmitter(MachineCodeEmitter* mce) { >>>>>> + CurBufferPtr = 0; >>>>>> + BufferBegin = 0; >>>>>> + BufferEnd = (unsigned char*)-1; >>>>>> + MCE = mce; >>>>>> + } >>>>>> + >>>>>> + SizeEmitter(std::vector<intptr_t> locations) { >>>>>> + LabelLocations = locati...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...LabelLocations; >>>>>>> + MachineCodeEmitter* MCE; >>>>>>> + >>>>>>> +public: >>>>>>> + SizeEmitter(MachineCodeEmitter* mce) { >>>>>>> + CurBufferPtr = 0; >>>>>>> + BufferBegin = 0; >>>>>>> + BufferEnd = (unsigned char*)-1; >>>>>>> + MCE = mce; >>>>>>> + } >>>>>>> + >>>>>>> + SizeEmitter(std::vector<intptr_t> locations) { >>>>>>> +...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...;>>>> + std::vector<intptr_t> LabelLocations; >>>>> + MachineCodeEmitter* MCE; >>>>> + >>>>> +public: >>>>> + SizeEmitter(MachineCodeEmitter* mce) { >>>>> + CurBufferPtr = 0; >>>>> + BufferBegin = 0; >>>>> + BufferEnd = (unsigned char*)-1; >>>>> + MCE = mce; >>>>> + } >>>>> + >>>>> + SizeEmitter(std::vector<intptr_t> locations) { >>>>> + LabelLocations = locations; >>>>&gt...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...;>>>>>> + MachineCodeEmitter* MCE; >>>>>>>> + >>>>>>>> +public: >>>>>>>> + SizeEmitter(MachineCodeEmitter* mce) { >>>>>>>> + CurBufferPtr = 0; >>>>>>>> + BufferBegin = 0; >>>>>>>> + BufferEnd = (unsigned char*)-1; >>>>>>>> + MCE = mce; >>>>>>>> + } >>>>>>>> + >>>>>>>> + SizeEmitter(std::vector<intptr_t> locations) { >>>&...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...;> + MachineCodeEmitter* MCE; >>>>>>>>> + >>>>>>>>> +public: >>>>>>>>> + SizeEmitter(MachineCodeEmitter* mce) { >>>>>>>>> + CurBufferPtr = 0; >>>>>>>>> + BufferBegin = 0; >>>>>>>>> + BufferEnd = (unsigned char*)-1; >>>>>>>>> + MCE = mce; >>>>>>>>> + } >>>>>>>>> + >>>>>>>>> + SizeEmitter(std::vector<intptr_t> locati...
2007 Sep 28
2
[LLVMdev] Accounting for code size
...I use it to account for the space used by the in-memory IR? As for generated code, the JIT [2] class simply returns a "void *" when generating code for that function, with no size information that I can see. MachineCodeEmitter [3] is obtainable from the JIT class, and it contains "BufferBegin", "BufferEnd", and "CurBufferPtr" as protected members; if they were available, determining the generated code size might be possible via some pointer arithmetic. Is there another way I might be missing? Or would I have to subclass JITEmitter and add a method to perform thi...
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...space llvm { > + > +class Function; > +class MachineCodeEmitter; > +class TargetData; > +class TargetMachine; > +class MachineFunction; > +class MachineModuleInfo; > +class MachineMove; > +class MRegisterInfo; > + > +class DwarfEmitter { > +protected: > + /// BufferBegin/BufferEnd - Pointers to the start and end of the > memory > + /// allocated for this code buffer. > + unsigned char *BufferBegin, *BufferEnd; > + > + /// CurBufferPtr - Pointer to the next byte of memory to fill > when emitting > + /// code. This is guranteed to be in...
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...t;> +class MachineCodeEmitter; >> +class TargetData; >> +class TargetMachine; >> +class MachineFunction; >> +class MachineModuleInfo; >> +class MachineMove; >> +class MRegisterInfo; >> + >> +class DwarfEmitter { >> +protected: >> + /// BufferBegin/BufferEnd - Pointers to the start and end of the >> memory >> + /// allocated for this code buffer. >> + unsigned char *BufferBegin, *BufferEnd; >> + >> + /// CurBufferPtr - Pointer to the next byte of memory to fill >> when emitting >> + /// code....
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone, Here's a patch that enables exception handling when jitting. I've copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need to factorize it, but the functionality is there and I'm very happy with it :) lli should now be able to execute the output from llvm-gcc when using exceptions (the UnwindInst instruction is not involved in this patch). Just add the
2009 Jul 03
0
[LLVMdev] Question about memory allocation in JIT
...t8_t *FnEnd = CurBufferPtr; > > +  std::vector<MachineRelocation> BackupRelocations = Relocations; >   if (!Relocations.empty()) { >     CurFn = F.getFunction(); >     NumRelos += Relocations.size(); > @@ -1028,8 +1030,18 @@ >   MemMgr->endFunctionBody(F.getFunction(), BufferBegin, CurBufferPtr); > >   if (CurBufferPtr == BufferEnd) { > -    retryWithMoreMemory(F); > -    return true; > +         for (unsigned i = 0, e = BackupRelocations.size(); i != e; ++i) { > +                 MachineRelocation &MR = BackupRelocations[i]; > +                 if (...
2007 Sep 28
0
[LLVMdev] Accounting for code size
...enerating code for that function, with no size information that > I can see. Right. If you pass -debug-only=jit to lli (before the bc file) it will print out the size of each function as it is compiled. > MachineCodeEmitter [3] is obtainable from the JIT class, and it > contains "BufferBegin", "BufferEnd", and "CurBufferPtr" as protected > members; if they were available, determining the generated code size > might be possible via some pointer arithmetic. Is there another way I > might be missing? Or would I have to subclass JITEmitter and add a > m...