Skip to content

Commit ce0998b

Browse files
committed
Review comment fixes
1 parent ec63593 commit ce0998b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,7 @@ class OpenACCClauseCIREmitter final
196196
mlir::Value upperBound, mlir::Value extent) {
197197
// Arrays always have a start-idx of 0.
198198
mlir::Value startIdx = createConstantInt(boundLoc, 64, 0);
199-
// TODO: OpenACC: It isn't clear that stride would ever be anything other
200-
// than '1'? We emit the type of the reference 'correctly' as far as I
201-
// know, so it should just be 1 element each time. We could perhaps use
202-
// the 'inBytes' variant here, but it isn't clear what value that gets us.
203-
// We might need to revisit this once we try to opt this and see what is
204-
// going to happen.
199+
// Stride is always 1 in C/C++.
205200
mlir::Value stride = createConstantInt(boundLoc, 64, 1);
206201

207202
auto bound = builder.create<mlir::acc::DataBoundsOp>(boundLoc, lowerBound,
@@ -261,7 +256,7 @@ class OpenACCClauseCIREmitter final
261256

262257
curVarExpr = section->getBase()->IgnoreParenImpCasts();
263258
} else {
264-
const auto *subscript = dyn_cast<ArraySubscriptExpr>(curVarExpr);
259+
const auto *subscript = cast<ArraySubscriptExpr>(curVarExpr);
265260

266261
lowerBound = emitIntExpr(subscript->getIdx());
267262
// Length of an array index is always 1.

0 commit comments

Comments
 (0)