static_cast<int32_t>(dynamicSizes.size()),
static_cast<int32_t>(symbolOperands.size())}));
if (alignment)
- $_state.addAttribute(getAlignmentAttrName(), alignment);
+ $_state.addAttribute(getAlignmentAttrStrName(), alignment);
}]>];
let extraClassDeclaration = [{
- static StringRef getAlignmentAttrName() { return "alignment"; }
+ static StringRef getAlignmentAttrStrName() { return "alignment"; }
MemRefType getType() { return getResult().getType().cast<MemRefType>(); }
-
- /// Returns the dynamic sizes for this alloc operation if specified.
- operand_range getDynamicSizes() { return dynamicSizes(); }
}];
let assemblyFormat = [{
Arg<AnyRankedOrUnrankedMemRef, "the memref to copy to",
[MemWrite]>:$target);
- let extraClassDeclaration = [{
- Value getSource() { return source();}
- Value getTarget() { return target(); }
- }];
-
let assemblyFormat = [{
$source `,` $target attr-dict `:` type($source) `to` type($target)
}];
Value getTagMemRef() {
return getOperand(1 + getSrcMemRefRank() + 1 + getDstMemRefRank() + 1);
}
+
// Returns the rank (number of indices) of the tag MemRefType.
unsigned getTagMemRefRank() {
return getTagMemRef().getType().cast<MemRefType>().getRank();
type($tagMemRef)
}];
let extraClassDeclaration = [{
- /// Returns the Tag MemRef associated with the DMA operation being waited
- /// on.
- Value getTagMemRef() { return tagMemRef(); }
-
- /// Returns the tag memref index for this DMA operation.
- operand_range getTagIndices() { return tagIndices(); }
-
/// Returns the rank (number of indices) of the tag memref.
unsigned getTagMemRefRank() {
return getTagMemRef().getType().cast<MemRefType>().getRank();
}
-
- /// Returns the number of elements transferred in the associated DMA
- /// operation.
- Value getNumElements() { return numElements(); }
}];
let hasFolder = 1;
let hasVerifier = 1;
MemRefType getMemRefType() {
return getMemRef().getType().cast<MemRefType>();
}
-
- operand_range getIndices() { return {operand_begin() + 1, operand_end()}; }
}];
let hasFolder = 1;
MemRefType getMemRefType() {
return memref().getType().cast<MemRefType>();
}
- static StringRef getLocalityHintAttrName() { return "localityHint"; }
- static StringRef getIsWriteAttrName() { return "isWrite"; }
- static StringRef getIsDataCacheAttrName() { return "isDataCache"; }
+ static StringRef getLocalityHintAttrStrName() { return "localityHint"; }
+ static StringRef getIsWriteAttrStrName() { return "isWrite"; }
+ static StringRef getIsDataCacheAttrStrName() { return "isDataCache"; }
}];
let hasCustomAssemblyFormat = 1;
[NoSideEffect, ViewLikeOpInterface])>,
Arguments<(ins AnyStridedMemRef:$src, IndexListArrayAttr:$reassociation)>,
Results<(outs AnyStridedMemRef:$result)>{
-
+
code commonExtraClassDeclaration = [{
SmallVector<AffineMap, 4> getReassociationMaps();
MemRefType getMemRefType() {
return getMemRef().getType().cast<MemRefType>();
}
-
- operand_range getIndices() {
- return {operand_begin() + 2, operand_end()};
- }
}];
let hasFolder = 1;
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>];
let extraClassDeclaration = [{
- static StringRef getPermutationAttrName() { return "permutation"; }
+ static StringRef getPermutationAttrStrName() { return "permutation"; }
ShapedType getShapedType() { return in().getType().cast<ShapedType>(); }
}];
return parser.emitError(parser.getNameLoc(),
"rw specifier has to be 'read' or 'write'");
result.addAttribute(
- PrefetchOp::getIsWriteAttrName(),
+ PrefetchOp::getIsWriteAttrStrName(),
parser.getBuilder().getBoolAttr(readOrWrite.equals("write")));
if (!cacheType.equals("data") && !cacheType.equals("instr"))
"cache type has to be 'data' or 'instr'");
result.addAttribute(
- PrefetchOp::getIsDataCacheAttrName(),
+ PrefetchOp::getIsDataCacheAttrStrName(),
parser.getBuilder().getBoolAttr(cacheType.equals("data")));
return success();
auto srcType = src.getType().cast<MemRefType>();
MemRefType resultType = computeCollapsedType(srcType, reassociation);
build(b, result, resultType, src, attrs);
- result.addAttribute(getReassociationAttrName(),
+ result.addAttribute(::mlir::getReassociationAttrName(),
getReassociationIndicesAttribute(b, reassociation));
}
MemRefType resultType = inferTransposeResultType(memRefType, permutationMap);
build(b, result, resultType, in, attrs);
- result.addAttribute(TransposeOp::getPermutationAttrName(), permutation);
+ result.addAttribute(TransposeOp::getPermutationAttrStrName(), permutation);
}
// transpose $in $permutation attr-dict : type($in) `to` type(results)
void TransposeOp::print(OpAsmPrinter &p) {
p << " " << in() << " " << permutation();
- p.printOptionalAttrDict((*this)->getAttrs(), {getPermutationAttrName()});
+ p.printOptionalAttrDict((*this)->getAttrs(), {getPermutationAttrStrName()});
p << " : " << in().getType() << " to " << getType();
}
parser.addTypeToList(dstType, result.types))
return failure();
- result.addAttribute(TransposeOp::getPermutationAttrName(),
+ result.addAttribute(TransposeOp::getPermutationAttrStrName(),
AffineMapAttr::get(permutation));
return success();
}