[PATCH] D37456: [globalisel][tablegen] Import ComplexPattern when used as an operator

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 14:14:29 PDT 2017


dsanders added a comment.

In https://reviews.llvm.org/D37456#896215, @qcolombet wrote:

> Looks fine with one comment:
>  Do you think we need a new opcode in the state machine for that?
>
> We could have reused ComplexRender with an additional parameter and use -1 to mean render all of them.
>  For the sake of optimization, the current patch is actually better, but in terms of simplicity I wonder.
>
> Feel free to commit as is. That was just my 2c :).


At the moment, I'm leaning towards separate opcodes on the basis that the we shouldn't make the common case longer to account for the rare case. However, the trade-off will be harder once we start trying to compress the table. Right now, opcodes are cheap since we have 2^32 of them but they'll be more valuable if we only have 2^8.

I think we should note this down as something to evaluate when we compress the table.


https://reviews.llvm.org/D37456





More information about the llvm-commits mailing list