File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
include/mlir/Dialect/LLVMIR Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,7 @@ def NVVM_PMEventOp : NVVM_PTXBuilder_Op<"pmevent">,
418
418
immediate operand a, in the range 0..15.
419
419
420
420
With `mask` it triggers one or more of the performance monitor events. Each
421
- bit in the 16-bit immediate operand a controls an event.
421
+ bit in the 16-bit immediate operand controls an event.
422
422
423
423
[For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#miscellaneous-instructions-pmevent)
424
424
}];
@@ -431,7 +431,7 @@ def NVVM_PMEventOp : NVVM_PTXBuilder_Op<"pmevent">,
431
431
let assemblyFormat = "attr-dict (`id` `=` $eventId^)? (`mask` `=` $maskedEventId^)?";
432
432
433
433
let extraClassDeclaration = [{
434
- bool hasIntrinsic() { if( getEventId()) return false; return true ; }
434
+ bool hasIntrinsic() { return ! getEventId(); }
435
435
}];
436
436
let extraClassDefinition = [{
437
437
std::string $cppClass::getPtx() { return std::string("pmevent %0;"); }
Original file line number Diff line number Diff line change @@ -190,16 +190,18 @@ LogicalResult BulkStoreOp::verify() {
190
190
}
191
191
192
192
LogicalResult PMEventOp::verify () {
193
- if (!getMaskedEventId () && !getEventId ()) {
193
+ auto eventId = getEventId ();
194
+ auto maskedEventId = getMaskedEventId ();
195
+ if (!maskedEventId && !eventId) {
194
196
return emitOpError () << " either `id` or `mask` must be set" ;
195
197
}
196
198
197
- if (getMaskedEventId () && getEventId () ) {
199
+ if (maskedEventId && eventId ) {
198
200
return emitOpError () << " `id` and `mask` cannot be set at the same time" ;
199
201
}
200
202
201
- if (getEventId () ) {
202
- if (getEventId () < 0 || getEventId () > 15 ) {
203
+ if (eventId ) {
204
+ if (eventId < 0 || eventId > 15 ) {
203
205
return emitOpError () << " `id` must be between 0 and 15" ;
204
206
}
205
207
}
You can’t perform that action at this time.
0 commit comments