[llvm] [VPlan] Use parameter packs for m_VPInstruction. NFC (PR #152272)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 03:08:34 PDT 2025
================
@@ -200,15 +200,9 @@ template <typename Ops_t, unsigned Opcode, bool Commutative,
struct Recipe_match {
Ops_t Ops;
- Recipe_match() : Ops() {
- static_assert(std::tuple_size<Ops_t>::value == 0 &&
- "constructor can only be used with zero operands");
- }
- Recipe_match(Ops_t Ops) : Ops(Ops) {}
- template <typename A_t, typename B_t>
- Recipe_match(A_t A, B_t B) : Ops({A, B}) {
- static_assert(std::tuple_size<Ops_t>::value == 2 &&
- "constructor can only be used for binary matcher");
+ template <typename... OpTy> Recipe_match(OpTy... Ops) : Ops(Ops...) {
+ static_assert(std::tuple_size<Ops_t>::value == sizeof...(Ops) &&
+ "number of operands in constructor doesn't match Ops_t");
----------------
fhahn wrote:
Is this change needed? It seems orthogonal to removing the various matchers, at least initially?
https://github.com/llvm/llvm-project/pull/152272
More information about the llvm-commits
mailing list