Most of the code that gets iterator_types from LinalgInterface is forced to
extract values from an Attribute. As a result, the usage pattern looks like
this:
SmallVector<StringRef> iterators = llvm::to_vector<4>(linalgOp.iterator_types().getAsValueRange<StringAttr>());
It also forces all operations that implement LinalgOp interface to have
iterator_types attribute even when the information can be easily infered from
other parameters.
In perfect future, getIteratorTypeArray should be the only method to get
iterator types from the interface. The default implementation can rely on
iterator_types attribute though.
The name getIteratorTypeArray was picked to be consistent with existing
getIndexingMapsArray.
This patch add a few sample usages. More cleanups will follow.