summaryrefslogtreecommitdiffstats
path: root/mlir/test/lib/TestDialect
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/test/lib/TestDialect')
-rw-r--r--mlir/test/lib/TestDialect/TestDialect.cpp12
-rw-r--r--mlir/test/lib/TestDialect/TestOps.td2
-rw-r--r--mlir/test/lib/TestDialect/TestPatterns.cpp12
3 files changed, 13 insertions, 13 deletions
diff --git a/mlir/test/lib/TestDialect/TestDialect.cpp b/mlir/test/lib/TestDialect/TestDialect.cpp
index 21cf69ec1fa..fef1f653307 100644
--- a/mlir/test/lib/TestDialect/TestDialect.cpp
+++ b/mlir/test/lib/TestDialect/TestDialect.cpp
@@ -100,7 +100,7 @@ struct TestInlinerInterface : public DialectInlinerInterface {
// Replace the values directly with the return operands.
assert(returnOp.getNumOperands() == valuesToRepl.size());
for (const auto &it : llvm::enumerate(returnOp.getOperands()))
- valuesToRepl[it.index()]->replaceAllUsesWith(it.value());
+ valuesToRepl[it.index()].replaceAllUsesWith(it.value());
}
/// Attempt to materialize a conversion for a type mismatch between a call
@@ -113,7 +113,7 @@ struct TestInlinerInterface : public DialectInlinerInterface {
Location conversionLoc) const final {
// Only allow conversion for i16/i32 types.
if (!(resultType.isInteger(16) || resultType.isInteger(32)) ||
- !(input->getType().isInteger(16) || input->getType().isInteger(32)))
+ !(input.getType().isInteger(16) || input.getType().isInteger(32)))
return nullptr;
return builder.create<TestCastOp>(conversionLoc, resultType, input);
}
@@ -298,12 +298,12 @@ LogicalResult mlir::OpWithInferTypeInterfaceOp::inferReturnTypes(
llvm::Optional<Location> location, ValueRange operands,
ArrayRef<NamedAttribute> attributes, RegionRange regions,
SmallVectorImpl<Type> &inferedReturnTypes) {
- if (operands[0]->getType() != operands[1]->getType()) {
+ if (operands[0].getType() != operands[1].getType()) {
return emitOptionalError(location, "operand type mismatch ",
- operands[0]->getType(), " vs ",
- operands[1]->getType());
+ operands[0].getType(), " vs ",
+ operands[1].getType());
}
- inferedReturnTypes.assign({operands[0]->getType()});
+ inferedReturnTypes.assign({operands[0].getType()});
return success();
}
diff --git a/mlir/test/lib/TestDialect/TestOps.td b/mlir/test/lib/TestDialect/TestOps.td
index dacb796de18..36eb545a39e 100644
--- a/mlir/test/lib/TestDialect/TestOps.td
+++ b/mlir/test/lib/TestDialect/TestOps.td
@@ -651,7 +651,7 @@ def OpSymbolBindingD : TEST_Op<"symbol_binding_d", []> {
let arguments = (ins I32:$input1, I32:$input2, I64Attr:$attr);
let results = (outs I32);
}
-def HasOneUse: Constraint<CPred<"$0->hasOneUse()">, "has one use">;
+def HasOneUse: Constraint<CPred<"$0.hasOneUse()">, "has one use">;
def : Pattern<
// Bind to source pattern op operand/attribute/result
(OpSymbolBindingA:$res_a $operand, $attr), [
diff --git a/mlir/test/lib/TestDialect/TestPatterns.cpp b/mlir/test/lib/TestDialect/TestPatterns.cpp
index 929c4a941a2..62ee89e0fe4 100644
--- a/mlir/test/lib/TestDialect/TestPatterns.cpp
+++ b/mlir/test/lib/TestDialect/TestPatterns.cpp
@@ -23,7 +23,7 @@ static void createOpI(PatternRewriter &rewriter, Value input) {
void handleNoResultOp(PatternRewriter &rewriter, OpSymbolBindingNoResult op) {
// Turn the no result op to a one-result op.
- rewriter.create<OpSymbolBindingB>(op.getLoc(), op.operand()->getType(),
+ rewriter.create<OpSymbolBindingB>(op.getLoc(), op.operand().getType(),
op.operand());
}
@@ -182,7 +182,7 @@ struct TestDropOpSignatureConversion : public ConversionPattern {
TypeConverter::SignatureConversion result(entry->getNumArguments());
for (unsigned i = 0, e = entry->getNumArguments(); i != e; ++i)
if (failed(converter.convertSignatureArg(
- i, entry->getArgument(i)->getType(), result)))
+ i, entry->getArgument(i).getType(), result)))
return matchFailure();
// Convert the region signature and just drop the operation.
@@ -214,12 +214,12 @@ struct TestSplitReturnType : public ConversionPattern {
matchAndRewrite(Operation *op, ArrayRef<Value> operands,
ConversionPatternRewriter &rewriter) const final {
// Check for a return of F32.
- if (op->getNumOperands() != 1 || !op->getOperand(0)->getType().isF32())
+ if (op->getNumOperands() != 1 || !op->getOperand(0).getType().isF32())
return matchFailure();
// Check if the first operation is a cast operation, if it is we use the
// results directly.
- auto *defOp = operands[0]->getDefiningOp();
+ auto *defOp = operands[0].getDefiningOp();
if (auto packerOp = llvm::dyn_cast_or_null<TestCastOp>(defOp)) {
rewriter.replaceOpWithNewOp<TestReturnOp>(op, packerOp.getOperands());
return matchSuccess();
@@ -277,7 +277,7 @@ struct TestUpdateConsumerType : public ConversionPattern {
matchAndRewrite(Operation *op, ArrayRef<Value> operands,
ConversionPatternRewriter &rewriter) const final {
// Verify that the incoming operand has been successfully remapped to F64.
- if (!operands[0]->getType().isF64())
+ if (!operands[0].getType().isF64())
return matchFailure();
rewriter.replaceOpWithNewOp<TestTypeConsumerOp>(op, operands[0]);
return matchSuccess();
@@ -380,7 +380,7 @@ struct TestLegalizePatternDriver
target.addDynamicallyLegalOp<TestTypeProducerOp>(
[](TestTypeProducerOp op) { return op.getType().isF64(); });
target.addDynamicallyLegalOp<TestTypeConsumerOp>([](TestTypeConsumerOp op) {
- return op.getOperand()->getType().isF64();
+ return op.getOperand().getType().isF64();
});
// Check support for marking certain operations as recursively legal.
OpenPOWER on IntegriCloud