Bitwidth of Machine Instructions


I am wondering if there is any way to figure out bitwidth of Machine Instructions. I see that ValueType information is available for nodes of DAG, but I couldn't find similar info for Machine Instructions. I particularly need this information for x86 target.
I appreciate your help and comments in this regard.

Thank you,

Do you mean the size of an instruction, or the size of an operand? Given a virtual or physical register, you can find the register class, then get the MVT::ValueType that the regclass can hold.


Well, what I am looking for is the size of data that an instruction operates on. For example, if there is a mov instruction I need to know whether it is movb or movl or any other variant.


Looking at the size of the register src/dst should be sufficient.