diff options
Diffstat (limited to 'mlir/lib/Analysis')
| -rw-r--r-- | mlir/lib/Analysis/LoopAnalysis.cpp | 16 | ||||
| -rw-r--r-- | mlir/lib/Analysis/Verifier.cpp | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/mlir/lib/Analysis/LoopAnalysis.cpp b/mlir/lib/Analysis/LoopAnalysis.cpp index 1b3c24fd9f9..1904a636647 100644 --- a/mlir/lib/Analysis/LoopAnalysis.cpp +++ b/mlir/lib/Analysis/LoopAnalysis.cpp @@ -118,15 +118,15 @@ uint64_t mlir::getLargestDivisorOfTripCount(const ForStmt &forStmt) { return tripCountExpr.getLargestKnownDivisor(); } -bool mlir::isAccessInvariant(const MLValue &input, MemRefType *memRefType, +bool mlir::isAccessInvariant(const MLValue &input, MemRefType memRefType, ArrayRef<MLValue *> indices, unsigned dim) { - assert(indices.size() == memRefType->getRank()); + assert(indices.size() == memRefType.getRank()); assert(dim < indices.size()); - auto layoutMap = memRefType->getAffineMaps(); - assert(memRefType->getAffineMaps().size() <= 1); + auto layoutMap = memRefType.getAffineMaps(); + assert(memRefType.getAffineMaps().size() <= 1); // TODO(ntv): remove dependency on Builder once we support non-identity // layout map. - Builder b(memRefType->getContext()); + Builder b(memRefType.getContext()); assert(layoutMap.empty() || layoutMap[0] == b.getMultiDimIdentityMap(indices.size())); (void)layoutMap; @@ -170,7 +170,7 @@ static bool isContiguousAccess(const MLValue &input, using namespace functional; auto indices = map([](SSAValue *val) { return dyn_cast<MLValue>(val); }, memoryOp->getIndices()); - auto *memRefType = memoryOp->getMemRefType(); + auto memRefType = memoryOp->getMemRefType(); for (unsigned d = 0, numIndices = indices.size(); d < numIndices; ++d) { if (fastestVaryingDim == (numIndices - 1) - d) { continue; @@ -184,8 +184,8 @@ static bool isContiguousAccess(const MLValue &input, template <typename LoadOrStoreOpPointer> static bool isVectorElement(LoadOrStoreOpPointer memoryOp) { - auto *memRefType = memoryOp->getMemRefType(); - return isa<VectorType>(memRefType->getElementType()); + auto memRefType = memoryOp->getMemRefType(); + return memRefType.getElementType().template isa<VectorType>(); } bool mlir::isVectorizableLoop(const ForStmt &loop, unsigned fastestVaryingDim) { diff --git a/mlir/lib/Analysis/Verifier.cpp b/mlir/lib/Analysis/Verifier.cpp index bfbcb169cfe..0dd030d5b45 100644 --- a/mlir/lib/Analysis/Verifier.cpp +++ b/mlir/lib/Analysis/Verifier.cpp @@ -195,7 +195,7 @@ bool CFGFuncVerifier::verify() { // Verify that the argument list of the function and the arg list of the first // block line up. - auto fnInputTypes = fn.getType()->getInputs(); + auto fnInputTypes = fn.getType().getInputs(); if (fnInputTypes.size() != firstBB->getNumArguments()) return failure("first block of cfgfunc must have " + Twine(fnInputTypes.size()) + @@ -306,7 +306,7 @@ bool CFGFuncVerifier::verifyBBArguments(ArrayRef<InstOperand> operands, bool CFGFuncVerifier::verifyReturn(const ReturnInst &inst) { // Verify that the return operands match the results of the function. - auto results = fn.getType()->getResults(); + auto results = fn.getType().getResults(); if (inst.getNumOperands() != results.size()) return failure("return has " + Twine(inst.getNumOperands()) + " operands, but enclosing function returns " + |

