search for: sizeemitt

Displaying 10 results from an estimated 10 matches for "sizeemitt".

Did you mean: sizeemitter
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
Hi Evan, Evan Cheng wrote: > 1) How are you computing size of the method being > jitted? I add a new pass with addSimpleCodeEmitter, with the emitter being a SizeEmitter. Since the target calls the emitter with functions such as writeByte, writeWord, etc.... the SizeEmitter class implements these function by incrementing a counter. At the end of the pass, the code size of the function is known. > 2) Why not simply add the functionality of allocating emissi...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...; + > /// PerformTailCallOpt - This flag is enabled when -tailcallopt is > specified > /// on the commandline. When the flag is on, the target will > perform tail call > /// optimization (pop the caller's stack) providing it supports it. > Index: include/llvm/CodeGen/SizeEmitter.h > =================================================================== > --- include/llvm/CodeGen/SizeEmitter.h (revision 0) > +++ include/llvm/CodeGen/SizeEmitter.h (revision 0) > @@ -0,0 +1,116 @@ > +//===-- llvm/CodeGen/MachineCodeEmitter.h - Code emission -------*- > C++...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
On Apr 1, 2008, at 12:50 AM, Nicolas Geoffray wrote: > Hi Evan, > > Evan Cheng wrote: >> 1) How are you computing size of the method being >> jitted? > > I add a new pass with addSimpleCodeEmitter, with the emitter being a > SizeEmitter. Since the target calls the emitter with functions such as > writeByte, writeWord, etc.... the SizeEmitter class implements these > function by incrementing a counter. > > At the end of the pass, the code size of the function is known. That's a hack. :-) Some targets already have...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...for all targets, is not very intrusive and requires fewer code, hence introduces fewer bugs ;-) > > Suppose you have the size, can't you pass the desired buffer size to > MachineCodeEmitter and have it do the right thing? Sure, that's what I'm doing. The emitter with the SizeEmitter class will give the accurate size to the MachineCodeEmitter. And the MachineCodeEmitter will emit the instructions in the buffer. My solution is surely using things in a way that wasn't intended, but it works fine and for all targets. Is this really a stopper for integrating it? (You can...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...plicated code). Nicolas > Evan > > >> >>> Suppose you have the size, can't you pass the desired buffer size to >>> MachineCodeEmitter and have it do the right thing? >>> >> Sure, that's what I'm doing. The emitter with the SizeEmitter class >> will >> give the accurate size to the MachineCodeEmitter. And the >> MachineCodeEmitter will emit the instructions in the buffer. >> >> My solution is surely using things in a way that wasn't intended, >> but it >> works fine and for all...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...van >> >> >>> >>>> Suppose you have the size, can't you pass the desired buffer size >>>> to >>>> MachineCodeEmitter and have it do the right thing? >>>> >>> Sure, that's what I'm doing. The emitter with the SizeEmitter class >>> will >>> give the accurate size to the MachineCodeEmitter. And the >>> MachineCodeEmitter will emit the instructions in the buffer. >>> >>> My solution is surely using things in a way that wasn't intended, >>> but it >>>...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...e logic is all there in emitMemModRMByte. What do you think? Evan > > >> >> Suppose you have the size, can't you pass the desired buffer size to >> MachineCodeEmitter and have it do the right thing? > > Sure, that's what I'm doing. The emitter with the SizeEmitter class > will > give the accurate size to the MachineCodeEmitter. And the > MachineCodeEmitter will emit the instructions in the buffer. > > My solution is surely using things in a way that wasn't intended, > but it > works fine and for all targets. Is this really a st...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...gt; Suppose you have the size, can't you pass the desired buffer size >>>>> to >>>>> MachineCodeEmitter and have it do the right thing? >>>>> >>>>> >>>> Sure, that's what I'm doing. The emitter with the SizeEmitter class >>>> will >>>> give the accurate size to the MachineCodeEmitter. And the >>>> MachineCodeEmitter will emit the instructions in the buffer. >>>> >>>> My solution is surely using things in a way that wasn't intended, >>>...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...pose you have the size, can't you pass the desired buffer size >>>>>> to >>>>>> MachineCodeEmitter and have it do the right thing? >>>>>> >>>>>> >>>>> Sure, that's what I'm doing. The emitter with the SizeEmitter >>>>> class >>>>> will >>>>> give the accurate size to the MachineCodeEmitter. And the >>>>> MachineCodeEmitter will emit the instructions in the buffer. >>>>> >>>>> My solution is surely using things in a...