[clang] [llvm] [NVPTX] Add pm_event intrinsics (PR #141278)

Durgadoss R via cfe-commits cfe-commits at lists.llvm.org
Mon May 26 06:26:18 PDT 2025


================
@@ -1868,6 +1868,38 @@ If the request failed, the behavior of these intrinsics is undefined.
 
 For more information, refer `PTX ISA <https://docs.nvidia.com/cuda/parallel-thread-execution/?a#parallel-synchronization-and-communication-instructions-clusterlaunchcontrol-query-cancel>`__.
 
+Perf Monitor Event Intrinsics
+-----------------------------
+
+'``llvm.nvvm.pm.event.[idx|mask]``' Intrinsics
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
+
+.. code-block:: llvm
+
+    declare void @llvm.nvvm.pm.event.idx(i32 immarg %idx_val)
----------------
durga4github wrote:

Thanks for the prompt on this, Alex!

I checked this and sass only has the `mask` variant.
The `immediate` variant is only a syntactic sugar from ptx and ptxas internally converts it to the `mask` variant.

So, I have removed the `idx` variant, and we only have the `mask` variant in the latest revision now.

https://github.com/llvm/llvm-project/pull/141278


More information about the cfe-commits mailing list