Nicolas Geoffray
2008-Apr-14 13:07 UTC
[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 good place to make them available to other passes? (ie the JIT) Thanks, Nicolas> Thanks. > > Evan >
Evan Cheng
2008-Apr-14 16:18 UTC
[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 > TargetMachine::getFunctionSize(MachineFunction*) and a > TargetInstrInfo::getInstructionSize(MachineInstruction*)? Is this a > good > place to make them available to other passes? (ie the JIT)I think both of these belong to TargetInstrInfo. And yes, it's a good idea, there are other passes which can make use of them, e.g. branch shortening. Thanks, Evan> > > Thanks, > Nicolas > >> Thanks. >> >> Evan >> > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Nicolas Geoffray
2008-Apr-15 11:24 UTC
[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 good > idea, there are other passes which can make use of them, e.g. branch > shortening. > > Thanks, > > Evan > > >> Thanks, >> Nicolas >> >> >>> Thanks. >>> >>> Evan >>> >>> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- A non-text attachment was scrubbed... Name: jit-size.patch Type: text/x-patch Size: 39859 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080415/0be1adb7/attachment.bin>
Maybe Matching Threads
- [LLVMdev] Being able to know the jitted code-size before emitting
- [LLVMdev] Being able to know the jitted code-size before emitting
- [LLVMdev] Being able to know the jitted code-size before emitting
- [LLVMdev] Being able to know the jitted code-size before emitting
- [LLVMdev] Being able to know the jitted code-size before emitting