summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Operation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/IR/Operation.cpp')
-rw-r--r--mlir/lib/IR/Operation.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/mlir/lib/IR/Operation.cpp b/mlir/lib/IR/Operation.cpp
index 6cf7eea6b4f..1d9147c4610 100644
--- a/mlir/lib/IR/Operation.cpp
+++ b/mlir/lib/IR/Operation.cpp
@@ -809,7 +809,7 @@ LogicalResult OpTrait::impl::verifySameTypeOperands(Operation *op) {
if (nOperands < 2)
return success();
- auto type = op->getOperand(0)->getType();
+ auto type = op->getOperand(0).getType();
for (auto opType : llvm::drop_begin(op->getOperandTypes(), 1))
if (opType != type)
return op->emitOpError() << "requires all operands to have the same type";
@@ -847,7 +847,7 @@ LogicalResult OpTrait::impl::verifySameOperandsShape(Operation *op) {
if (failed(verifyAtLeastNOperands(op, 1)))
return failure();
- auto type = op->getOperand(0)->getType();
+ auto type = op->getOperand(0).getType();
for (auto opType : llvm::drop_begin(op->getOperandTypes(), 1)) {
if (failed(verifyCompatibleShape(opType, type)))
return op->emitOpError() << "requires the same shape for all operands";
@@ -860,7 +860,7 @@ LogicalResult OpTrait::impl::verifySameOperandsAndResultShape(Operation *op) {
failed(verifyAtLeastNResults(op, 1)))
return failure();
- auto type = op->getOperand(0)->getType();
+ auto type = op->getOperand(0).getType();
for (auto resultType : op->getResultTypes()) {
if (failed(verifyCompatibleShape(resultType, type)))
return op->emitOpError()
@@ -917,7 +917,7 @@ LogicalResult OpTrait::impl::verifySameOperandsAndResultType(Operation *op) {
failed(verifyAtLeastNResults(op, 1)))
return failure();
- auto type = op->getResult(0)->getType();
+ auto type = op->getResult(0).getType();
auto elementType = getElementTypeOrSelf(type);
for (auto resultType : llvm::drop_begin(op->getResultTypes(), 1)) {
if (getElementTypeOrSelf(resultType) != elementType ||
@@ -946,7 +946,7 @@ static LogicalResult verifySuccessor(Operation *op, unsigned succNo) {
auto operandIt = operands.begin();
for (unsigned i = 0, e = operandCount; i != e; ++i, ++operandIt) {
- if ((*operandIt)->getType() != destBB->getArgument(i)->getType())
+ if ((*operandIt).getType() != destBB->getArgument(i).getType())
return op->emitError() << "type mismatch for bb argument #" << i
<< " of successor #" << succNo;
}
@@ -1056,9 +1056,9 @@ LogicalResult OpTrait::impl::verifyResultSizeAttr(Operation *op,
void impl::buildBinaryOp(Builder *builder, OperationState &result, Value lhs,
Value rhs) {
- assert(lhs->getType() == rhs->getType());
+ assert(lhs.getType() == rhs.getType());
result.addOperands({lhs, rhs});
- result.types.push_back(lhs->getType());
+ result.types.push_back(lhs.getType());
}
ParseResult impl::parseOneResultSameOperandTypeOp(OpAsmParser &parser,
@@ -1077,7 +1077,7 @@ void impl::printOneResultOp(Operation *op, OpAsmPrinter &p) {
// If not all the operand and result types are the same, just use the
// generic assembly form to avoid omitting information in printing.
- auto resultType = op->getResult(0)->getType();
+ auto resultType = op->getResult(0).getType();
if (llvm::any_of(op->getOperandTypes(),
[&](Type type) { return type != resultType; })) {
p.printGenericOp(op);
@@ -1113,15 +1113,15 @@ ParseResult impl::parseCastOp(OpAsmParser &parser, OperationState &result) {
}
void impl::printCastOp(Operation *op, OpAsmPrinter &p) {
- p << op->getName() << ' ' << *op->getOperand(0);
+ p << op->getName() << ' ' << op->getOperand(0);
p.printOptionalAttrDict(op->getAttrs());
- p << " : " << op->getOperand(0)->getType() << " to "
- << op->getResult(0)->getType();
+ p << " : " << op->getOperand(0).getType() << " to "
+ << op->getResult(0).getType();
}
Value impl::foldCastOp(Operation *op) {
// Identity cast
- if (op->getOperand(0)->getType() == op->getResult(0)->getType())
+ if (op->getOperand(0).getType() == op->getResult(0).getType())
return op->getOperand(0);
return nullptr;
}
OpenPOWER on IntegriCloud