associating id with opcodes

    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:


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.


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 and X86InstrInfo.h.