[PATCH] D85203: TableGen/GlobalISel: Allow inst matcher to check multiple opcodes

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 11:24:29 PDT 2020


arsenm added a comment.

In D85203#2200542 <https://reviews.llvm.org/D85203#2200542>, @paquette wrote:

> Could we have more than 2 possible choices for opcodes? Would it make sense to make this take an arbitrary number of alternatives?
>
> Maybe something like
>
>   /// - InsnID - Instruction ID
>   /// - NumChoices - Number of possible opcodes
>   /// - Opcode1, Opcode2, Opcode3, ... OpcodeNumChoices - Possible opcodes, ordered by preference
>   GIM_CheckOpcodeWithAlternatives
>
> I can't think of anything off the top of my head, but it could be useful I suppose.

I considered doing it this way, but I couldn't come up with a case where we would need more than 2. I'd rather use the simpler thing unless there's a concrete need


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85203/new/

https://reviews.llvm.org/D85203



More information about the llvm-commits mailing list