Returns true if the give type is a vector or contains items that are vectors.
(self, ty, innerListsOnly=False)
| 491 | isinstance(value.owner.owner, func.FuncOp)) |
| 492 | |
| 493 | def containsList(self, ty, innerListsOnly=False): |
| 494 | """Returns true if the give type is a vector or contains items that are |
| 495 | vectors.""" |
| 496 | if cc.StdvecType.isinstance(ty): |
| 497 | return (not innerListsOnly or |
| 498 | self.containsList(cc.StdvecType.getElementType(ty))) |
| 499 | if not cc.StructType.isinstance(ty): |
| 500 | return False |
| 501 | eleTys = cc.StructType.getTypes(ty) |
| 502 | return any((self.containsList(t) for t in eleTys)) |
| 503 | |
| 504 | def getIntegerType(self, width=64): |
| 505 | """Return an MLIR `IntegerType` of the given bit width (defaults to 64 |
no test coverage detected