[llvm-dev] TableGen Instruction class Uses and Defs

Miguel Inigo J. Manalac via llvm-dev llvm-dev at lists.llvm.org
Sun Mar 1 17:42:08 PST 2020

Hello LLVM-Dev,

I understand that Uses and Defs are for implicit registers. Uses is defined as for using non-operand registers and Defs is defined as for modifying non-operand registers.

For example, for compare and compare with carry instructions, is my understanding correct that the instructions should be defined as described below?
Considering that the carry flag is part of the status register:
Compare - The status register is only listed in the Defs register list since it modifies the status register.
Compare with carry - The status register is listed in both Defs and Uses register lists since it refers the status register (Carry flag information) and modifies it.

With this understanding, am I correct to assume that all "with carry" instructions lists the status register in the Uses? The status register being listed in the Defs depends on whether the instruction modifies the status register or not.

Thank you in advance for your responses, they are highly appreciated.

Miguel Inigo J. Manalac (1852)

JAPANESE: ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ENGLISH: This e-mail is intended for the person(s) to which it is addressed. If you have received it by mistake, please notify the sender and delete the received email. In addition, our company shall not assume any responsibility even if it causes any inconvenience, such as loss of mail, inconsistencies, delays, etc., due to the inclusion of computer viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200302/7146e53b/attachment.html>

More information about the llvm-dev mailing list