summaryrefslogtreecommitdiffstats
path: root/mlir/test
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/test')
-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
-rw-r--r--mlir/test/lib/Transforms/TestInlining.cpp4
-rw-r--r--mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp2
-rw-r--r--mlir/test/lib/Transforms/TestVectorizationUtils.cpp2
-rw-r--r--mlir/test/mlir-tblgen/op-result.td4
-rw-r--r--mlir/test/mlir-tblgen/predicate.td4
8 files changed, 21 insertions, 21 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.
diff --git a/mlir/test/lib/Transforms/TestInlining.cpp b/mlir/test/lib/Transforms/TestInlining.cpp
index 584849d0f51..fd36df4f29b 100644
--- a/mlir/test/lib/Transforms/TestInlining.cpp
+++ b/mlir/test/lib/Transforms/TestInlining.cpp
@@ -37,7 +37,7 @@ struct Inliner : public FunctionPass<Inliner> {
// Try to inline each of the call operations.
for (auto caller : callers) {
auto callee = dyn_cast_or_null<FunctionalRegionOp>(
- caller.getCallee()->getDefiningOp());
+ caller.getCallee().getDefiningOp());
if (!callee)
continue;
@@ -47,7 +47,7 @@ struct Inliner : public FunctionPass<Inliner> {
interface, &callee.body(), caller,
llvm::to_vector<8>(caller.getArgOperands()),
SmallVector<Value, 8>(caller.getResults()), caller.getLoc(),
- /*shouldCloneInlinedRegion=*/!callee.getResult()->hasOneUse())))
+ /*shouldCloneInlinedRegion=*/!callee.getResult().hasOneUse())))
continue;
// If the inlining was successful then erase the call and callee if
diff --git a/mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp b/mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
index d5e0b7df02b..e1ac1b77229 100644
--- a/mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
+++ b/mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
@@ -25,7 +25,7 @@ struct TestMemRefStrideCalculation
void TestMemRefStrideCalculation::runOnFunction() {
llvm::outs() << "Testing: " << getFunction().getName() << "\n";
getFunction().walk([&](AllocOp allocOp) {
- auto memrefType = allocOp.getResult()->getType().cast<MemRefType>();
+ auto memrefType = allocOp.getResult().getType().cast<MemRefType>();
int64_t offset;
SmallVector<int64_t, 4> strides;
if (failed(getStridesAndOffset(memrefType, strides, offset))) {
diff --git a/mlir/test/lib/Transforms/TestVectorizationUtils.cpp b/mlir/test/lib/Transforms/TestVectorizationUtils.cpp
index 6f4d948e55f..eed7c83a684 100644
--- a/mlir/test/lib/Transforms/TestVectorizationUtils.cpp
+++ b/mlir/test/lib/Transforms/TestVectorizationUtils.cpp
@@ -116,7 +116,7 @@ void VectorizerTestPass::testVectorShapeRatio(llvm::raw_ostream &outs) {
// As a consequence we write only Ops with a single return type for the
// purpose of this test. If we need to test more intricate behavior in the
// future we can always extend.
- auto superVectorType = opInst->getResult(0)->getType().cast<VectorType>();
+ auto superVectorType = opInst->getResult(0).getType().cast<VectorType>();
auto ratio = shapeRatio(superVectorType, subVectorType);
if (!ratio.hasValue()) {
opInst->emitRemark("NOT MATCHED");
diff --git a/mlir/test/mlir-tblgen/op-result.td b/mlir/test/mlir-tblgen/op-result.td
index a177f9ca305..6de6c1f7508 100644
--- a/mlir/test/mlir-tblgen/op-result.td
+++ b/mlir/test/mlir-tblgen/op-result.td
@@ -26,7 +26,7 @@ def OpB : NS_Op<"same_input_output_type_op", [SameOperandsAndResultType]> {
// CHECK: void OpB::build(Builder *tblgen_builder, OperationState &tblgen_state, Type y, Value x)
// CHECK: tblgen_state.addTypes(y);
// CHECK: void OpB::build(Builder *tblgen_builder, OperationState &tblgen_state, Value x)
-// CHECK: tblgen_state.addTypes({x->getType()});
+// CHECK: tblgen_state.addTypes({x.getType()});
def OpC : NS_Op<"three_normal_result_op", []> {
let results = (outs I32:$x, /*unnamed*/I32, I32:$z);
@@ -106,4 +106,4 @@ def OpK : NS_Op<"only_input_is_variadic_with_same_value_type_op", [SameOperandsA
}
// CHECK-LABEL: OpK::build(Builder *tblgen_builder, OperationState &tblgen_state, ValueRange input)
-// CHECK: tblgen_state.addTypes({input.front()->getType()});
+// CHECK: tblgen_state.addTypes({input.front().getType()});
diff --git a/mlir/test/mlir-tblgen/predicate.td b/mlir/test/mlir-tblgen/predicate.td
index ecfe709aa1b..d02d64526a7 100644
--- a/mlir/test/mlir-tblgen/predicate.td
+++ b/mlir/test/mlir-tblgen/predicate.td
@@ -17,7 +17,7 @@ def OpA : NS_Op<"op_for_CPred_containing_multiple_same_placeholder", []> {
// CHECK-LABEL: OpA::verify
// CHECK: for (Value v : getODSOperands(0)) {
-// CHECK: if (!((v->getType().isInteger(32) || v->getType().isF32())))
+// CHECK: if (!((v.getType().isInteger(32) || v.getType().isF32())))
def OpB : NS_Op<"op_for_And_PredOpTrait", [
PredOpTrait<"both first and second holds",
@@ -91,4 +91,4 @@ def OpK : NS_Op<"op_for_AnyTensorOf", []> {
// CHECK-LABEL: OpK::verify
// CHECK: for (Value v : getODSOperands(0)) {
-// CHECK: if (!(((v->getType().isa<TensorType>())) && (((v->getType().cast<ShapedType>().getElementType().isF32())) || ((v->getType().cast<ShapedType>().getElementType().isInteger(32))))))
+// CHECK: if (!(((v.getType().isa<TensorType>())) && (((v.getType().cast<ShapedType>().getElementType().isF32())) || ((v.getType().cast<ShapedType>().getElementType().isInteger(32))))))
OpenPOWER on IntegriCloud