rocm.bindings.llvm.c.remarks#
2026-09-24
12 min read time
Advanced Micro Devices, Inc.
Attributes#
Classes#
The type of the emitted remark. |
|
(No short description) |
|
(No short description) |
|
(No short description) |
|
(No short description) |
|
(No short description) |
Functions#
|
|
|
Returns the buffer holding the string. |
|
Returns the size of the string. |
Return the path to the source file for a debug location. |
|
Return the line in the source file for a debug location. |
|
Return the column in the source file for a debug location. |
|
|
Returns the key of an argument. |
Returns the value of an argument. This is a string that can contain newlines. |
|
Returns the debug location that is attached to the value of this argument. |
|
|
Free the resources used by the remark entry. |
|
The type of the remark. |
|
Get the name of the pass that emitted this remark. |
|
Get an identifier of the remark. |
|
Get the name of the function being processed when the remark was emitted. |
|
Returns the debug location that is attached to this remark. |
|
Return the hotness of the remark. |
|
The number of arguments the remark holds. |
|
Get a new iterator to iterate over a remark's argument. |
|
Get the next argument in |
|
Creates a remark parser that can be used to parse the buffer located in p |
|
Creates a remark parser that can be used to parse the buffer located in p |
|
Returns the next remark in the file. |
|
Returns |
|
Returns a null-terminated string containing an error message. |
|
Releases all the resources used by |
Returns the version of the remarks library. |
Module Contents#
- class rocm.bindings.llvm.c.remarks.LLVMRemarkType#
Bases:
enum.IntEnumThe type of the emitted remark.
- class rocm.bindings.llvm.c.remarks.LLVMRemarkOpaqueString(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.remarks.LLVMRemarkStringRef#
- rocm.bindings.llvm.c.remarks.LLVMRemarkStringGetData(String)#
Returns the buffer holding the string.
- Since:
REMARKS_API_VERSION=0
- Args:
- String (
LLVMRemarkOpaqueString/object): (undocumented)
- String (
- Returns:
bytes: (undocumented)
C signature
const char * LLVMRemarkStringGetData(LLVMRemarkStringRef String)
- rocm.bindings.llvm.c.remarks.LLVMRemarkStringGetLen(String)#
Returns the size of the string.
- Since:
REMARKS_API_VERSION=0
- Args:
- String (
LLVMRemarkOpaqueString/object): (undocumented)
- String (
- Returns:
int: (undocumented)
C signature
uint32_t LLVMRemarkStringGetLen(LLVMRemarkStringRef String)
- class rocm.bindings.llvm.c.remarks.LLVMRemarkOpaqueDebugLoc(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.remarks.LLVMRemarkDebugLocRef#
- rocm.bindings.llvm.c.remarks.LLVMRemarkDebugLocGetSourceFilePath(DL)#
Return the path to the source file for a debug location.
- Since:
REMARKS_API_VERSION=0
- Args:
- DL (
LLVMRemarkOpaqueDebugLoc/object): (undocumented)
- DL (
- Returns:
None: (undocumented)
C signature
LLVMRemarkStringRef LLVMRemarkDebugLocGetSourceFilePath(LLVMRemarkDebugLocRef DL)
- rocm.bindings.llvm.c.remarks.LLVMRemarkDebugLocGetSourceLine(DL)#
Return the line in the source file for a debug location.
- Since:
REMARKS_API_VERSION=0
- Args:
- DL (
LLVMRemarkOpaqueDebugLoc/object): (undocumented)
- DL (
- Returns:
int: (undocumented)
C signature
uint32_t LLVMRemarkDebugLocGetSourceLine(LLVMRemarkDebugLocRef DL)
- rocm.bindings.llvm.c.remarks.LLVMRemarkDebugLocGetSourceColumn(DL)#
Return the column in the source file for a debug location.
- Since:
REMARKS_API_VERSION=0
- Args:
- DL (
LLVMRemarkOpaqueDebugLoc/object): (undocumented)
- DL (
- Returns:
int: (undocumented)
C signature
uint32_t LLVMRemarkDebugLocGetSourceColumn(LLVMRemarkDebugLocRef DL)
- class rocm.bindings.llvm.c.remarks.LLVMRemarkOpaqueArg(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.remarks.LLVMRemarkArgRef#
- rocm.bindings.llvm.c.remarks.LLVMRemarkArgGetKey(Arg)#
Returns the key of an argument.
The key defines what the value is, and the same key can appear multiple times in the list of arguments.
- Since:
REMARKS_API_VERSION=0
- Args:
- Arg (
LLVMRemarkOpaqueArg/object): (undocumented)
- Arg (
- Returns:
None: (undocumented)
C signature
LLVMRemarkStringRef LLVMRemarkArgGetKey(LLVMRemarkArgRef Arg)
- rocm.bindings.llvm.c.remarks.LLVMRemarkArgGetValue(Arg)#
Returns the value of an argument. This is a string that can contain newlines.
- Since:
REMARKS_API_VERSION=0
- Args:
- Arg (
LLVMRemarkOpaqueArg/object): (undocumented)
- Arg (
- Returns:
None: (undocumented)
C signature
LLVMRemarkStringRef LLVMRemarkArgGetValue(LLVMRemarkArgRef Arg)
- rocm.bindings.llvm.c.remarks.LLVMRemarkArgGetDebugLoc(Arg)#
Returns the debug location that is attached to the value of this argument.
If there is no debug location, the return value will be
NULL.- Since:
REMARKS_API_VERSION=0
- Args:
- Arg (
LLVMRemarkOpaqueArg/object): (undocumented)
- Arg (
- Returns:
None: (undocumented)
C signature
LLVMRemarkDebugLocRef LLVMRemarkArgGetDebugLoc(LLVMRemarkArgRef Arg)
- class rocm.bindings.llvm.c.remarks.LLVMRemarkOpaqueEntry(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryRef#
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryDispose(Remark)#
Free the resources used by the remark entry.
- Since:
REMARKS_API_VERSION=0
- Args:
- Remark (
LLVMRemarkOpaqueEntry/object): (undocumented)
- Remark (
C signature
void LLVMRemarkEntryDispose(LLVMRemarkEntryRef Remark)
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryGetType(Remark)#
The type of the remark.
For example, it can allow users to only keep the missed optimizations from the compiler.
- Since:
REMARKS_API_VERSION=0
- Args:
- Remark (
LLVMRemarkOpaqueEntry/object): (undocumented)
- Remark (
- Returns:
LLVMRemarkType: (undocumented)
C signature
enum LLVMRemarkType LLVMRemarkEntryGetType(LLVMRemarkEntryRef Remark)
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryGetPassName(Remark)#
Get the name of the pass that emitted this remark.
- Since:
REMARKS_API_VERSION=0
- Args:
- Remark (
LLVMRemarkOpaqueEntry/object): (undocumented)
- Remark (
- Returns:
None: (undocumented)
C signature
LLVMRemarkStringRef LLVMRemarkEntryGetPassName(LLVMRemarkEntryRef Remark)
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryGetRemarkName(Remark)#
Get an identifier of the remark.
- Since:
REMARKS_API_VERSION=0
- Args:
- Remark (
LLVMRemarkOpaqueEntry/object): (undocumented)
- Remark (
- Returns:
None: (undocumented)
C signature
LLVMRemarkStringRef LLVMRemarkEntryGetRemarkName(LLVMRemarkEntryRef Remark)
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryGetFunctionName(Remark)#
Get the name of the function being processed when the remark was emitted.
- Since:
REMARKS_API_VERSION=0
- Args:
- Remark (
LLVMRemarkOpaqueEntry/object): (undocumented)
- Remark (
- Returns:
None: (undocumented)
C signature
LLVMRemarkStringRef LLVMRemarkEntryGetFunctionName(LLVMRemarkEntryRef Remark)
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryGetDebugLoc(Remark)#
Returns the debug location that is attached to this remark.
If there is no debug location, the return value will be
NULL.- Since:
REMARKS_API_VERSION=0
- Args:
- Remark (
LLVMRemarkOpaqueEntry/object): (undocumented)
- Remark (
- Returns:
None: (undocumented)
C signature
LLVMRemarkDebugLocRef LLVMRemarkEntryGetDebugLoc(LLVMRemarkEntryRef Remark)
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryGetHotness(Remark)#
Return the hotness of the remark.
A hotness of
0means this value is not set.- Since:
REMARKS_API_VERSION=0
- Args:
- Remark (
LLVMRemarkOpaqueEntry/object): (undocumented)
- Remark (
- Returns:
int: (undocumented)
C signature
uint64_t LLVMRemarkEntryGetHotness(LLVMRemarkEntryRef Remark)
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryGetNumArgs(Remark)#
The number of arguments the remark holds.
- Since:
REMARKS_API_VERSION=0
- Args:
- Remark (
LLVMRemarkOpaqueEntry/object): (undocumented)
- Remark (
- Returns:
int: (undocumented)
C signature
uint32_t LLVMRemarkEntryGetNumArgs(LLVMRemarkEntryRef Remark)
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryGetFirstArg(Remark)#
Get a new iterator to iterate over a remark’s argument.
If there are no arguments in
Remark,the return value will beNULL.The lifetime of the returned value is bound to the lifetime of
Remark.- Since:
REMARKS_API_VERSION=0
- Args:
- Remark (
LLVMRemarkOpaqueEntry/object): (undocumented)
- Remark (
- Returns:
None: (undocumented)
C signature
LLVMRemarkArgRef LLVMRemarkEntryGetFirstArg(LLVMRemarkEntryRef Remark)
- rocm.bindings.llvm.c.remarks.LLVMRemarkEntryGetNextArg(It, Remark)#
Get the next argument in
Remarkfrom the position ofIt.Returns
NULLif there are no more arguments available.The lifetime of the returned value is bound to the lifetime of
Remark.- Since:
REMARKS_API_VERSION=0
- Args:
- It (
LLVMRemarkOpaqueArg/object): (undocumented)
- Remark (
LLVMRemarkOpaqueEntry/object): (undocumented)
- It (
- Returns:
None: (undocumented)
C signature
LLVMRemarkArgRef LLVMRemarkEntryGetNextArg(LLVMRemarkArgRef It, LLVMRemarkEntryRef Remark)
- class rocm.bindings.llvm.c.remarks.LLVMRemarkOpaqueParser(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.remarks.LLVMRemarkParserRef#
- rocm.bindings.llvm.c.remarks.LLVMRemarkParserCreateYAML(Buf, Size)#
Creates a remark parser that can be used to parse the buffer located in p Buf of size
Sizebytes.Bufcannot beNULL.This function should be paired with LLVMRemarkParserDispose() to avoid leaking resources.
- Since:
REMARKS_API_VERSION=0
- Args:
- Returns:
None: (undocumented)
C signature
LLVMRemarkParserRef LLVMRemarkParserCreateYAML(const void * Buf, uint64_t Size)
- rocm.bindings.llvm.c.remarks.LLVMRemarkParserCreateBitstream(Buf, Size)#
Creates a remark parser that can be used to parse the buffer located in p Buf of size
Sizebytes.Bufcannot beNULL.This function should be paired with LLVMRemarkParserDispose() to avoid leaking resources.
- Since:
REMARKS_API_VERSION=1
- Args:
- Returns:
None: (undocumented)
C signature
LLVMRemarkParserRef LLVMRemarkParserCreateBitstream(const void * Buf, uint64_t Size)
- rocm.bindings.llvm.c.remarks.LLVMRemarkParserGetNext(Parser)#
Returns the next remark in the file.
The value pointed to by the return value needs to be disposed using a call to LLVMRemarkEntryDispose().
All the entries in the returned value that are of LLVMRemarkStringRef type will become invalidated once a call to LLVMRemarkParserDispose is made.
If the parser reaches the end of the buffer, the return value will be
NULL.In the case of an error, the return value will be
NULL, and:LLVMRemarkParserHasError() will return
1.LLVMRemarkParserGetErrorMessage() will return a descriptive error message.
An error may occur if:
An argument is invalid.
There is a parsing error. This can occur on things like malformed YAML.
There is a Remark semantic error. This can occur on well-formed files with missing or extra fields.
Here is a quick example of the usage:
``` LLVMRemarkParserRef Parser = LLVMRemarkParserCreateYAML(Buf, Size); LLVMRemarkEntryRef Remark = NULL; while ((Remark = LLVMRemarkParserGetNext(Parser))) {
// use Remark LLVMRemarkEntryDispose(Remark); // Release memory.
} bool HasError = LLVMRemarkParserHasError(Parser); LLVMRemarkParserDispose(Parser); ```
- Since:
REMARKS_API_VERSION=0
- Args:
- Parser (
LLVMRemarkOpaqueParser/object): (undocumented)
- Parser (
- Returns:
None: (undocumented)
C signature
LLVMRemarkEntryRef LLVMRemarkParserGetNext(LLVMRemarkParserRef Parser)
- rocm.bindings.llvm.c.remarks.LLVMRemarkParserHasError(Parser)#
Returns
1if the parser encountered an error while parsing the buffer.- Since:
REMARKS_API_VERSION=0
- Args:
- Parser (
LLVMRemarkOpaqueParser/object): (undocumented)
- Parser (
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMRemarkParserHasError(LLVMRemarkParserRef Parser)
- rocm.bindings.llvm.c.remarks.LLVMRemarkParserGetErrorMessage(Parser)#
Returns a null-terminated string containing an error message.
In case of no error, the result is
NULL.The memory of the string is bound to the lifetime of
Parser.If LLVMRemarkParserDispose() is called, the memory of the string will be released.- Since:
REMARKS_API_VERSION=0
- Args:
- Parser (
LLVMRemarkOpaqueParser/object): (undocumented)
- Parser (
- Returns:
bytes: (undocumented)
C signature
const char * LLVMRemarkParserGetErrorMessage(LLVMRemarkParserRef Parser)
- rocm.bindings.llvm.c.remarks.LLVMRemarkParserDispose(Parser)#
Releases all the resources used by
Parser.- Since:
REMARKS_API_VERSION=0
- Args:
- Parser (
LLVMRemarkOpaqueParser/object): (undocumented)
- Parser (
C signature
void LLVMRemarkParserDispose(LLVMRemarkParserRef Parser)