[PATCH] D51044: [PatternMatch] Use generic One, Two, ThreeOps_match classes (NFC).

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 09:42:14 PDT 2018


lebedev.ri added inline comments.


================
Comment at: include/llvm/IR/PatternMatch.h:997
 
-template <typename Cond_t, typename LHS_t, typename RHS_t>
-struct SelectClass_match {
-  Cond_t C;
-  LHS_t L;
-  RHS_t R;
+/// Matches instructions with Opcode and three operands.
+template <typename T0, unsigned Opcode> struct OneOps_match {
----------------
Comment needs updating.


================
Comment at: include/llvm/IR/PatternMatch.h:1012
+
+/// Matches instructions with Opcode and three operands.
+template <typename T0, typename T1, unsigned Opcode> struct TwoOps_match {
----------------
Comment needs updating.


================
Comment at: include/llvm/IR/PatternMatch.h:1031
+struct ThreeOps_match {
+  T0 Op1;
+  T1 Op2;
----------------
Here and elsewhere in this patch: so do arrays start from `0` or `1`?


https://reviews.llvm.org/D51044





More information about the llvm-commits mailing list