summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Dialect/Linalg/Utils/Utils.cpp')
-rw-r--r--mlir/lib/Dialect/Linalg/Utils/Utils.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
index eb501f9b5b5..125937807f4 100644
--- a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
+++ b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
@@ -92,7 +92,7 @@ mlir::edsc::LoopNestRangeBuilder::LoopNestRangeBuilder(
}
mlir::edsc::LoopNestRangeBuilder::LoopNestRangeBuilder(
- ArrayRef<ValueHandle *> ivs, ArrayRef<Value *> ranges)
+ ArrayRef<ValueHandle *> ivs, ArrayRef<ValuePtr> ranges)
: LoopNestRangeBuilder(
ivs, SmallVector<ValueHandle, 4>(ranges.begin(), ranges.end())) {}
@@ -106,26 +106,26 @@ ValueHandle LoopNestRangeBuilder::LoopNestRangeBuilder::operator()(
return ValueHandle::null();
}
-static Value *emitOrFoldComposedAffineApply(OpBuilder &b, Location loc,
- AffineMap map,
- ArrayRef<Value *> operandsRef,
- OperationFolder *folder) {
- SmallVector<Value *, 4> operands(operandsRef.begin(), operandsRef.end());
+static ValuePtr emitOrFoldComposedAffineApply(OpBuilder &b, Location loc,
+ AffineMap map,
+ ArrayRef<ValuePtr> operandsRef,
+ OperationFolder *folder) {
+ SmallVector<ValuePtr, 4> operands(operandsRef.begin(), operandsRef.end());
fullyComposeAffineMapAndOperands(&map, &operands);
canonicalizeMapAndOperands(&map, &operands);
return folder ? folder->create<AffineApplyOp>(b, loc, map, operands)
: b.create<AffineApplyOp>(loc, map, operands);
}
-SmallVector<Value *, 4>
+SmallVector<ValuePtr, 4>
mlir::linalg::applyMapToValues(OpBuilder &b, Location loc, AffineMap map,
- ArrayRef<Value *> values,
+ ArrayRef<ValuePtr> values,
OperationFolder *folder) {
- SmallVector<Value *, 4> res;
+ SmallVector<ValuePtr, 4> res;
res.reserve(map.getNumResults());
unsigned numDims = map.getNumDims();
// For each `expr` in `map`, applies the `expr` to the values extracted from
- // ranges. If the resulting application can be folded into a Value*, the
+ // ranges. If the resulting application can be folded into a Value, the
// folding occurs eagerly. Otherwise, an affine.apply operation is emitted.
for (auto expr : map.getResults()) {
AffineMap map = AffineMap::get(numDims, 0, expr);
@@ -137,12 +137,12 @@ mlir::linalg::applyMapToValues(OpBuilder &b, Location loc, AffineMap map,
/// Returns all the operands of `linalgOp` that are not views.
/// Asserts that these operands are value types to allow transformations like
/// tiling to just use the values when cloning `linalgOp`.
-SmallVector<Value *, 4>
+SmallVector<ValuePtr, 4>
mlir::linalg::getAssumedNonViewOperands(LinalgOp linalgOp) {
auto *op = linalgOp.getOperation();
unsigned numViews = linalgOp.getNumInputsAndOutputs();
unsigned nOperands = op->getNumOperands() - numViews;
- SmallVector<Value *, 4> res;
+ SmallVector<ValuePtr, 4> res;
res.reserve(nOperands);
for (unsigned i = 0; i < nOperands; ++i) {
res.push_back(op->getOperand(numViews + i));
OpenPOWER on IntegriCloud