Introduce custom iname tags
Second go at custom iname tags. Iname tags are parsed by the kernels parse_iname_tag methods, which uses a list of parser objects from three sources:
- Parsers added to the kernel object through the keyword argument
iname_tag_parsers
. - Parsers provided by the target through the
iname_tag_parsers
method - A global parser
default_iname_tag_parser
currently parsing all the existent implementation tags.
Parser are expected to return an instance of loopy.kernel.data.InameTag
or None
, if the parser does not accept the given tag. This follows the
idea of how loopy handles function manglers.
The MR also adapts the instruction matching mechanism to also match instructions,
within inames tagged a certain way. This can be done either directly through loopy.match.InameTagged(tag)
or in string syntax as inametag:tag
. In the latter, tag is restricted
to being a string parseable into a tag (by above mechanism), while the former also allows
a tag object.
Edited by Dominic Kempf