Skip to content

Commit cc2a86a

Browse files
authored
[LLVM][Docs] Add language reference for llvm.readsteadycounter (llvm#132040)
Summary: This was not added in the original patch, add LLVM documentation.
1 parent 93b7c1b commit cc2a86a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

llvm/docs/LangRef.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14562,6 +14562,33 @@ is lowered to a constant 0.
1456214562
Note that runtime support may be conditional on the privilege-level code is
1456314563
running at and the host platform.
1456414564

14565+
'``llvm.readsteadycounter``' Intrinsic
14566+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14567+
14568+
Syntax:
14569+
"""""""
14570+
14571+
::
14572+
14573+
declare i64 @llvm.readsteadycounter()
14574+
14575+
Overview:
14576+
"""""""""
14577+
14578+
The '``llvm.readsteadycounter``' intrinsic provides access to the fixed
14579+
frequency clock on targets that support it. Unlike '``llvm.readcyclecounter``',
14580+
this clock is expected to tick at a constant rate, making it suitable for
14581+
measuring elapsed time. The actual frequency of the clock is implementation
14582+
defined.
14583+
14584+
Semantics:
14585+
""""""""""
14586+
14587+
When directly supported, reading the steady counter should not modify any
14588+
memory. Implementations are allowed to either return an application
14589+
specific value or a system wide value. On backends without support, this
14590+
is lowered to a constant 0.
14591+
1456514592
'``llvm.clear_cache``' Intrinsic
1456614593
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1456714594

0 commit comments

Comments
 (0)