[LLVMdev] Being able to know the jitted code-size before emitting

Evan Cheng
2008-04-14T16:18:59Z

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