Miguel Inigo J. Manalac via llvm-dev
2020-Mar-02 01:42 UTC
[llvm-dev] TableGen Instruction class Uses and Defs
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. Sincerely, 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>
Nicolai Hähnle via llvm-dev
2020-Mar-02 14:43 UTC
[llvm-dev] TableGen Instruction class Uses and Defs
Hi Miguel, On Mon, Mar 2, 2020 at 2:42 AM Miguel Inigo J. Manalac via llvm-dev <llvm-dev at lists.llvm.org> wrote:> 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.Yes, this is the typical way to define such instructions. Cheers, Nicolai> > > > Thank you in advance for your responses, they are highly appreciated. > > > > Sincerely, > > 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. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- Lerne, wie die Welt wirklich ist, aber vergiss niemals, wie sie sein sollte.
Miguel Inigo J. Manalac via llvm-dev
2020-Mar-02 22:54 UTC
[llvm-dev] TableGen Instruction class Uses and Defs
Hello Nicolai, Thank you for your help! I understand its use now. Best, Miguel -----Original Message----- From: Nicolai Hähnle [mailto:nhaehnle at gmail.com] Sent: March 02, 2020 10:44 PM To: Miguel Inigo J. Manalac Cc: llvm-dev Subject: Re: [llvm-dev] TableGen Instruction class Uses and Defs Hi Miguel, On Mon, Mar 2, 2020 at 2:42 AM Miguel Inigo J. Manalac via llvm-dev <llvm-dev at lists.llvm.org> wrote:> 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.Yes, this is the typical way to define such instructions. Cheers, Nicolai> > > > Thank you in advance for your responses, they are highly appreciated. > > > > Sincerely, > > 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. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- Lerne, wie die Welt wirklich ist, aber vergiss niemals, wie sie sein sollte. 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.
Marco Speziali via llvm-dev
2021-Apr-09 20:57 UTC
[llvm-dev] Implicit register move using TableGen
Dear all, I need to implement the following behavior for all instructions that require two source operands: %1 = add i16 %a, %b Should match the ADD instruction which has 1 outs and 1 ins. The second operand %b should be moved into the implicit register R14 (fixed). For now I implemented the PseudoADD instruction which gets expanded into a move plus the mentioned ADD instruction. This obviously creates a low of unnecessary moves and prevents any optimizations of the register R14 (e.g. R14 could be used as destination register in previous operations without the need for a move). I'd like to transform the dag: (set GPR:$rd, (add GPR:$rs1, GPR:$rs2)) to something like: (set R14, GPR:$rs2), (set GPR:$rd, (add GPR:$rs1)) Is it possible to specify this transformation using TableGen? If now how could I achieve this? Thanks. Best Regards, Marco Speziali