search for: getinstsize

Displaying 12 results from an estimated 12 matches for "getinstsize".

2008 Apr 16
0
[LLVMdev] Being able to know the jitted code-size before emitting
Comments below. On Apr 15, 2008, at 4:24 AM, Nicolas Geoffray wrote: > OK, here's a new patch that adds the infrastructure and the > implementation for X86, ARM and PPC of GetInstSize and > GetFunctionSize. Both functions are virtual functions defined in > TargetInstrInfo.h. > > For X86, I moved some commodity functions from X86CodeEmitter to > X86InstrInfo. > > What do you think? > > Nicolas > > > Evan Cheng wrote: >> >> I t...
2008 Apr 15
4
[LLVMdev] Being able to know the jitted code-size before emitting
OK, here's a new patch that adds the infrastructure and the implementation for X86, ARM and PPC of GetInstSize and GetFunctionSize. Both functions are virtual functions defined in TargetInstrInfo.h. For X86, I moved some commodity functions from X86CodeEmitter to X86InstrInfo. What do you think? Nicolas Evan Cheng wrote: > > I think both of these belong to TargetInstrInfo. And yes, it's a g...
2008 Apr 16
3
[LLVMdev] Being able to know the jitted code-size before emitting
> > How about a default GetInstSize() as well? Return 1 for every > instruction except for some special TargetInstrInfo instructions, e.g. > PHI, IMPLICIT_DEF, LABEL. I don't know if it's useful or not. But > perhaps we can default most targets to it? > > I prefer not giving a default implementation a...
2008 Apr 16
0
[LLVMdev] Being able to know the jitted code-size before emitting
On Apr 16, 2008, at 1:46 AM, Nicolas Geoffray wrote: > >> >> How about a default GetInstSize() as well? Return 1 for every >> instruction except for some special TargetInstrInfo instructions, >> e.g. >> PHI, IMPLICIT_DEF, LABEL. I don't know if it's useful or not. But >> perhaps we can default most targets to it? >> >> > > I prefer not gi...
2008 Apr 14
2
[LLVMdev] Being able to know the jitted code-size before emitting
Hi Evan, Evan Cheng wrote: > > Yeah, sorry I'm stubborn sometimes. :-) And really I think adding the > code size functionality is not really that complicated. I would be > happy to help if you run into issues. > > What do you think of adding a TargetMachine::getFunctionSize(MachineFunction*) and a TargetInstrInfo::getInstructionSize(MachineInstruction*)? Is this a
2008 Apr 14
0
[LLVMdev] Being able to know the jitted code-size before emitting
On Apr 14, 2008, at 6:07 AM, Nicolas Geoffray wrote: > Hi Evan, > > Evan Cheng wrote: >> >> Yeah, sorry I'm stubborn sometimes. :-) And really I think adding the >> code size functionality is not really that complicated. I would be >> happy to help if you run into issues. >> >> > > What do you think of adding a >
2007 Jul 03
0
[LLVMdev] Solaris 9 compilation
...er function `std::string <unnamed>::MSILWriter::getTypeName(const llvm::Type*, bool, bool)': /home/ggreif/llvm/lib/Target/MSIL/MSILWriter.cpp:333: warning: control reaches end of non-void function 8) /home/ggreif/llvm/lib/Target/ARM/ARMInstrInfo.cpp: In function `unsigned int llvm::ARM::GetInstSize(llvm::MachineInstr*)': /home/ggreif/llvm/lib/Target/ARM/ARMInstrInfo.cpp:560: warning: control reaches end of non-void function 9) /home/ggreif/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp: In member function `bool <unnamed>::VRPSolver::below(llvm::Instruction*)': /home/ggreif...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...teWord, 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 ways to compute the exact size of a function. See ARM::GetFunctionSize() ARM::GetInstSize(). I'd like to see them standardized (all targets that have JIT support can accurately calculate the function / instruction sizes) and then you can make use of that. > > >> 2) Why not simply add the functionality of allocating emission >> buffer of specific size to Mach...
2008 Apr 17
1
[LLVMdev] Being able to know the jitted code-size before emitting
...If so, it computes it and gives it through the ActualPtr argument. I suppose it's OK to commit, but if anyone wants to complain, I'm listening :) Thanks, Nicolas Evan Cheng wrote: > On Apr 16, 2008, at 1:46 AM, Nicolas Geoffray wrote: > > >>> How about a default GetInstSize() as well? Return 1 for every >>> instruction except for some special TargetInstrInfo instructions, >>> e.g. >>> PHI, IMPLICIT_DEF, LABEL. I don't know if it's useful or not. But >>> perhaps we can default most targets to it? >>> >>> &...
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
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...> That's a hack. :-) It is if you think that code emitter should only be used for actually writing somewhere the data. It is not if you find it another useful utility ;-) > Some targets already have ways to compute the exact > size of a function. See ARM::GetFunctionSize() ARM::GetInstSize(). I'd > like to see them standardized (all targets that have JIT support can > accurately calculate the function / instruction sizes) and then you > can make use of that. > OK, I see. However this requires to do this to all targets. In my solution, it works for all targe...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...ter should only be used for actually > writing somewhere the data. It is not if you find it another useful > utility ;-) Except it's pretty slow at it. :-) > > >> Some targets already have ways to compute the exact >> size of a function. See ARM::GetFunctionSize() ARM::GetInstSize(). >> I'd >> like to see them standardized (all targets that have JIT support can >> accurately calculate the function / instruction sizes) and then you >> can make use of that. >> > > OK, I see. However this requires to do this to all targets. In my > s...