[LLVMdev] associating id with opcodes

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Sun Aug 14 13:25:39 PDT 2011


I don't know if the approach I'm thinking is enough for the use you
wanna do, but if you want something MC level, you can use MCInstrDesc
to pass some info through TSFlags. Look how X86 does with the REX
prefix in X86InstrFormats.td and X86InstrInfo.h.

On Sun, Aug 14, 2011 at 10:05 AM, shreyas krishnan <shreyas76 at gmail.com> wrote:
> I am sorry, I actually meant Machine Instructions - is there a way ?
> One use of that is I would like to be able to group instructions
> together and be able check their group quickly.
>
> thanks
> shrey
>
>
> On Sun, Aug 14, 2011 at 1:16 AM, Bill Wendling <wendling at apple.com> wrote:
>> On Aug 13, 2011, at 11:04 AM, shreyas krishnan wrote:
>>
>>> Hi
>>>    Is there a way to associate  additional info with every opcode
>>> like an id either through the td files or when building an instruction
>>> ?
>>>
>> The only way I can think of is metadata on the LLVM IR instruction:
>>
>>        http://llvm.org/docs/LangRef.html#metadata
>>
>> -bw
>>
>>
>>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc




More information about the llvm-dev mailing list