Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,7 @@ class OpenACCClauseCIREmitter final
}

void VisitDeviceNumClause(const OpenACCDeviceNumClause &clause) {
if constexpr (isOneOfTypes<OpTy, InitOp, ShutdownOp>) {
operation.getDeviceNumOperandMutable().append(
createIntExpr(clause.getIntExpr()));
} else if constexpr (isOneOfTypes<OpTy, SetOp>) {
// This is only a separate case because the getter name is different in
// 'set' for some reason.
if constexpr (isOneOfTypes<OpTy, InitOp, ShutdownOp, SetOp>) {
operation.getDeviceNumMutable().append(
createIntExpr(clause.getIntExpr()));
} else {
Expand Down
8 changes: 4 additions & 4 deletions mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -2611,11 +2611,11 @@ def OpenACC_InitOp : OpenACC_Op<"init", [AttrSizedOperandSegments]> {
}];

let arguments = (ins OptionalAttr<TypedArrayAttrBase<OpenACC_DeviceTypeAttr, "Device type attributes">>:$device_types,
Optional<IntOrIndex>:$deviceNumOperand,
Optional<IntOrIndex>:$deviceNum,
Optional<I1>:$ifCond);

let assemblyFormat = [{
oilist(`device_num` `(` $deviceNumOperand `:` type($deviceNumOperand) `)`
oilist(`device_num` `(` $deviceNum `:` type($deviceNum) `)`
| `if` `(` $ifCond `)`
) attr-dict-with-keyword
}];
Expand All @@ -2642,11 +2642,11 @@ def OpenACC_ShutdownOp : OpenACC_Op<"shutdown", [AttrSizedOperandSegments]> {
}];

let arguments = (ins OptionalAttr<TypedArrayAttrBase<OpenACC_DeviceTypeAttr, "Device type attributes">>:$device_types,
Optional<IntOrIndex>:$deviceNumOperand,
Optional<IntOrIndex>:$deviceNum,
Optional<I1>:$ifCond);

let assemblyFormat = [{
oilist(`device_num` `(` $deviceNumOperand `:` type($deviceNumOperand) `)`
oilist(`device_num` `(` $deviceNum `:` type($deviceNum) `)`
|`if` `(` $ifCond `)`
) attr-dict-with-keyword
}];
Expand Down
Loading