summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Dialect/AffineOps/AffineOps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Dialect/AffineOps/AffineOps.cpp')
-rw-r--r--mlir/lib/Dialect/AffineOps/AffineOps.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/Dialect/AffineOps/AffineOps.cpp b/mlir/lib/Dialect/AffineOps/AffineOps.cpp
index bfe72101e85..d80f9865ccb 100644
--- a/mlir/lib/Dialect/AffineOps/AffineOps.cpp
+++ b/mlir/lib/Dialect/AffineOps/AffineOps.cpp
@@ -107,7 +107,7 @@ static bool isFunctionRegion(Region *region) {
/// function. A value of index type defined at the top level is always a valid
/// symbol.
bool mlir::isTopLevelValue(ValuePtr value) {
- if (auto arg = dyn_cast<BlockArgument>(value))
+ if (auto arg = value.dyn_cast<BlockArgument>())
return isFunctionRegion(arg->getOwner()->getParent());
return isFunctionRegion(value->getDefiningOp()->getParentRegion());
}
@@ -134,7 +134,7 @@ bool mlir::isValidDim(ValuePtr value) {
return false;
}
// This value has to be a block argument for a FuncOp or an affine.for.
- auto *parentOp = cast<BlockArgument>(value)->getOwner()->getParentOp();
+ auto *parentOp = value.cast<BlockArgument>()->getOwner()->getParentOp();
return isa<FuncOp>(parentOp) || isa<AffineForOp>(parentOp);
}
@@ -1571,7 +1571,7 @@ bool mlir::isForInductionVar(ValuePtr val) {
/// Returns the loop parent of an induction variable. If the provided value is
/// not an induction variable, then return nullptr.
AffineForOp mlir::getForInductionVarOwner(ValuePtr val) {
- auto ivArg = dyn_cast<BlockArgument>(val);
+ auto ivArg = val.dyn_cast<BlockArgument>();
if (!ivArg || !ivArg->getOwner())
return AffineForOp();
auto *containingInst = ivArg->getOwner()->getParent()->getParentOp();
OpenPOWER on IntegriCloud