Skip to content

Commit

Permalink
avoid wrong use of value range
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Gysi committed May 27, 2020
1 parent daa0fa8 commit cf014a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Conversion/StencilToStandard/ConvertStencilToStandard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class ReturnOpLowering : public StencilOpToStdPattern<stencil::ReturnOp> {
/// Compute unroll factor and dimension
auto unrollFac = returnOp.getUnrollFactor();
size_t unrollDim = returnOp.getUnrollDimension();

// Get the loop operation
if (!isa<ParallelOp>(operation->getParentOp()))
return failure();
Expand Down Expand Up @@ -495,7 +495,7 @@ SmallVector<Value, 3> StencilToStdPattern::computeIndexValues(
for (auto en : llvm::enumerate(allocation)) {
// Insert values at the front to convert from column- to row-major
if (en.value()) {
ValueRange params = {
SmallVector<Value, 2> params = {
inductionVars[en.index()],
rewriter.create<ConstantIndexOp>(loc, offset[en.index()])
.getResult()};
Expand Down
2 changes: 1 addition & 1 deletion lib/Dialect/Stencil/StencilOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static void print(stencil::ApplyOp applyOp, OpAsmPrinter &printer) {
printer << stencil::ApplyOp::getOperationName() << ' ';

// Print the region arguments
ValueRange operands = applyOp.getOperands();
SmallVector<Value, 10> operands = applyOp.getOperands();
if (!applyOp.region().empty() && !operands.empty()) {
Block *body = applyOp.getBody();
printer << "(";
Expand Down

0 comments on commit cf014a3

Please sign in to comment.