[PATCH] D29933: [RISCV 11/n] Initial codegen support for ALU operations
David Chisnall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 04:33:16 PDT 2017
theraven added inline comments.
================
Comment at: lib/Target/RISCV/RISCVInstrInfo.td:146
+def ORI : ALU_ri<0b110, "ori", or>;
+def ANDI : ALU_ri<0b111, "andi", and>;
----------------
This style is followed on the existing back ends to varying degrees, but I find that the mixing of instruction and pattern definitions makes it harder to follow the code when debugging. The places where these are separate are usually a lot easier to spot mistakes (as a trivial example here, the instruction that will be selected for an OR DAG node is defined either on line 145 or on line 172, depending on the operand of the node. Separating these definitions out [ideally into a separate RISCVPatterns.td file that's included] from the instruction definitions and placing them next to each other in the source makes it a lot easier to understand the logic and cleanly separates concerns).
https://reviews.llvm.org/D29933
More information about the llvm-commits
mailing list