Top Description Inners Fields Constructors Methods
org.lwjgl.llvm

public Class LLVMRemarks

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

Requires LLVM 9 or higher.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
LLVMRemarks.Functions

Contains the function pointers loaded from LLVMCore.getLibrary().

Field Summary

Modifier and TypeField and Description
public static final int
LLVMRemarkTypeAnalysis

The type of the emitted remark.

public static final int
LLVMRemarkTypeAnalysisAliasing

The type of the emitted remark.

public static final int
LLVMRemarkTypeAnalysisFPCommute

The type of the emitted remark.

public static final int
LLVMRemarkTypeFailure

The type of the emitted remark.

public static final int
LLVMRemarkTypeMissed

The type of the emitted remark.

public static final int
LLVMRemarkTypePassed

The type of the emitted remark.

public static final int
LLVMRemarkTypeUnknown

The type of the emitted remark.

public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long
LLVMRemarkArgGetDebugLoc(long Arg)

Returns the debug location that is attached to the value of this argument.

public static long
LLVMRemarkArgGetKey(long Arg)

Returns the key of an argument.

public static long
LLVMRemarkArgGetValue(long Arg)

Returns the value of an argument.

public static int
LLVMRemarkDebugLocGetSourceColumn(long DL)

Return the column in the source file for a debug location.

public static long
LLVMRemarkDebugLocGetSourceFilePath(long DL)

Return the path to the source file for a debug location.

public static int
LLVMRemarkDebugLocGetSourceLine(long DL)

Return the line in the source file for a debug location.

public static void
LLVMRemarkEntryDispose(long Remark)

Free the resources used by the remark entry.

public static long
LLVMRemarkEntryGetDebugLoc(long Remark)

Returns the debug location that is attached to this remark.

public static long
LLVMRemarkEntryGetFirstArg(long Remark)

Get a new iterator to iterate over a remark's argument.

public static long
LLVMRemarkEntryGetFunctionName(long Remark)

Get the name of the function being processed when the remark was emitted.

public static long
LLVMRemarkEntryGetHotness(long Remark)

Return the hotness of the remark.

public static long
LLVMRemarkEntryGetNextArg(long It, long Remark)

Get the next argument in Remark from the position of It.

public static int
LLVMRemarkEntryGetNumArgs(long Remark)

The number of arguments the remark holds.

public static long
LLVMRemarkEntryGetPassName(long Remark)

Get the name of the pass that emitted this remark.

public static long
LLVMRemarkEntryGetRemarkName(long Remark)

Get an identifier of the remark.

public static int
LLVMRemarkEntryGetType(long Remark)

The type of the remark.

public static long
LLVMRemarkParserCreateBitstream(ByteBuffer Buf)

Creates a remark parser that can be used to parse the buffer located in Buf of size Size bytes.

public static long
LLVMRemarkParserCreateYAML(ByteBuffer Buf)

Creates a remark parser that can be used to parse the buffer located in Buf of size Size bytes.

public static void
LLVMRemarkParserDispose(long Parser)

Releases all the resources used by Parser.

public static String
LLVMRemarkParserGetErrorMessage(long Parser)

Returns a null-terminated string containing an error message.

public static long
LLVMRemarkParserGetNext(long Parser)

Returns the next remark in the file.

public static boolean
LLVMRemarkParserHasError(long Parser)

Returns 1 if the parser encountered an error while parsing the buffer.

public static String
LLVMRemarkStringGetData(long String)

Returns the buffer holding the string.

public static int
LLVMRemarkStringGetLen(long String)

Returns the size of the string.

public static int
LLVMRemarkVersion()

Returns the version of the remarks library.

public static long
nLLVMRemarkParserCreateBitstream(long Buf, long Size)

Unsafe version of: RemarkParserCreateBitstream

public static long
nLLVMRemarkParserCreateYAML(long Buf, long Size)

Unsafe version of: RemarkParserCreateYAML

public static long
public static long
nLLVMRemarkStringGetData(long String)

Unsafe version of: RemarkStringGetData

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LLVMRemarkTypeAnalysisback to summary
public static final int LLVMRemarkTypeAnalysis

The type of the emitted remark. (enum LLVMRemarkType)

Enum values:
LLVMRemarkTypeAnalysisAliasingback to summary
public static final int LLVMRemarkTypeAnalysisAliasing

The type of the emitted remark. (enum LLVMRemarkType)

Enum values:
LLVMRemarkTypeAnalysisFPCommuteback to summary
public static final int LLVMRemarkTypeAnalysisFPCommute

The type of the emitted remark. (enum LLVMRemarkType)

Enum values:
LLVMRemarkTypeFailureback to summary
public static final int LLVMRemarkTypeFailure

The type of the emitted remark. (enum LLVMRemarkType)

Enum values:
LLVMRemarkTypeMissedback to summary
public static final int LLVMRemarkTypeMissed

The type of the emitted remark. (enum LLVMRemarkType)

Enum values:
LLVMRemarkTypePassedback to summary
public static final int LLVMRemarkTypePassed

The type of the emitted remark. (enum LLVMRemarkType)

Enum values:
LLVMRemarkTypeUnknownback to summary
public static final int LLVMRemarkTypeUnknown

The type of the emitted remark. (enum LLVMRemarkType)

Enum values:
REMARKS_API_VERSIONback to summary
public static final int REMARKS_API_VERSION

Constructor Detail

LLVMRemarksback to summary
protected LLVMRemarks()

Method Detail

LLVMRemarkArgGetDebugLocback to summary
public static long LLVMRemarkArgGetDebugLoc(long 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.

Annotations
@NativeType:LLVMRemarkDebugLocRef
LLVMRemarkArgGetKeyback to summary
public static long LLVMRemarkArgGetKey(long 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.

Annotations
@NativeType:LLVMRemarkStringRef
LLVMRemarkArgGetValueback to summary
public static long LLVMRemarkArgGetValue(long Arg)

Returns the value of an argument. This is a string that can contain newlines.

Annotations
@NativeType:LLVMRemarkStringRef
LLVMRemarkDebugLocGetSourceColumnback to summary
public static int LLVMRemarkDebugLocGetSourceColumn(long DL)

Return the column in the source file for a debug location.

Annotations
@NativeType:uint32_t
LLVMRemarkDebugLocGetSourceFilePathback to summary
public static long LLVMRemarkDebugLocGetSourceFilePath(long DL)

Return the path to the source file for a debug location.

Annotations
@NativeType:LLVMRemarkStringRef
LLVMRemarkDebugLocGetSourceLineback to summary
public static int LLVMRemarkDebugLocGetSourceLine(long DL)

Return the line in the source file for a debug location.

Annotations
@NativeType:uint32_t
LLVMRemarkEntryDisposeback to summary
public static void LLVMRemarkEntryDispose(long Remark)

Free the resources used by the remark entry.

LLVMRemarkEntryGetDebugLocback to summary
public static long LLVMRemarkEntryGetDebugLoc(long Remark)

Returns the debug location that is attached to this remark.

If there is no debug location, the return value will be NULL.

Annotations
@NativeType:LLVMRemarkDebugLocRef
LLVMRemarkEntryGetFirstArgback to summary
public static long LLVMRemarkEntryGetFirstArg(long Remark)

Get a new iterator to iterate over a remark's argument.

If there are no arguments in Remark, the return value will be NULL.

The lifetime of the returned value is bound to the lifetime of Remark.

Annotations
@NativeType:LLVMRemarkArgRef
LLVMRemarkEntryGetFunctionNameback to summary
public static long LLVMRemarkEntryGetFunctionName(long Remark)

Get the name of the function being processed when the remark was emitted.

Annotations
@NativeType:LLVMRemarkStringRef
LLVMRemarkEntryGetHotnessback to summary
public static long LLVMRemarkEntryGetHotness(long Remark)

Return the hotness of the remark.

A hotness of 0 means this value is not set.

Annotations
@NativeType:uint64_t
LLVMRemarkEntryGetNextArgback to summary
public static long LLVMRemarkEntryGetNextArg(long It, long Remark)

Get the next argument in Remark from the position of It.

Returns NULL if there are no more arguments available.

The lifetime of the returned value is bound to the lifetime of Remark.

Annotations
@NativeType:LLVMRemarkArgRef
LLVMRemarkEntryGetNumArgsback to summary
public static int LLVMRemarkEntryGetNumArgs(long Remark)

The number of arguments the remark holds.

Annotations
@NativeType:uint32_t
LLVMRemarkEntryGetPassNameback to summary
public static long LLVMRemarkEntryGetPassName(long Remark)

Get the name of the pass that emitted this remark.

Annotations
@NativeType:LLVMRemarkStringRef
LLVMRemarkEntryGetRemarkNameback to summary
public static long LLVMRemarkEntryGetRemarkName(long Remark)

Get an identifier of the remark.

Annotations
@NativeType:LLVMRemarkStringRef
LLVMRemarkEntryGetTypeback to summary
public static int LLVMRemarkEntryGetType(long Remark)

The type of the remark. For example, it can allow users to only keep the missed optimizations from the compiler.

Annotations
@NativeType:enum LLVMRemarkType
LLVMRemarkParserCreateBitstreamback to summary
public static long LLVMRemarkParserCreateBitstream(ByteBuffer Buf)

Creates a remark parser that can be used to parse the buffer located in Buf of size Size bytes.

Buf cannot be NULL.

This function should be paired with RemarkParserDispose to avoid leaking resources.

Annotations
@NativeType:LLVMRemarkParserRef
Since
10
LLVMRemarkParserCreateYAMLback to summary
public static long LLVMRemarkParserCreateYAML(ByteBuffer Buf)

Creates a remark parser that can be used to parse the buffer located in Buf of size Size bytes.

Buf cannot be NULL.

This function should be paired with RemarkParserDispose to avoid leaking resources.

Annotations
@NativeType:LLVMRemarkParserRef
LLVMRemarkParserDisposeback to summary
public static void LLVMRemarkParserDispose(long Parser)

Releases all the resources used by Parser.

LLVMRemarkParserGetErrorMessageback to summary
public static String LLVMRemarkParserGetErrorMessage(long 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 RemarkParserDispose is called, the memory of the string will be released.

Annotations
@Nullable
@NativeType:char const *
LLVMRemarkParserGetNextback to summary
public static long LLVMRemarkParserGetNext(long Parser)

Returns the next remark in the file.

The value pointed to by the return value needs to be disposed using a call to RemarkEntryDispose.

All the entries in the returned value that are of LLVMRemarkStringRef type will become invalidated once a call to RemarkParserDispose 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:

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);
Annotations
@NativeType:LLVMRemarkEntryRef
LLVMRemarkParserHasErrorback to summary
public static boolean LLVMRemarkParserHasError(long Parser)

Returns 1 if the parser encountered an error while parsing the buffer.

Annotations
@NativeType:LLVMBool
LLVMRemarkStringGetDataback to summary
public static String LLVMRemarkStringGetData(long String)

Returns the buffer holding the string.

Annotations
@Nullable
@NativeType:char const *
LLVMRemarkStringGetLenback to summary
public static int LLVMRemarkStringGetLen(long String)

Returns the size of the string.

Annotations
@NativeType:uint32_t
LLVMRemarkVersionback to summary
public static int LLVMRemarkVersion()

Returns the version of the remarks library.

Annotations
@NativeType:uint32_t
nLLVMRemarkParserCreateBitstreamback to summary
public static long nLLVMRemarkParserCreateBitstream(long Buf, long Size)

Unsafe version of: RemarkParserCreateBitstream

nLLVMRemarkParserCreateYAMLback to summary
public static long nLLVMRemarkParserCreateYAML(long Buf, long Size)

Unsafe version of: RemarkParserCreateYAML

nLLVMRemarkParserGetErrorMessageback to summary
public static long nLLVMRemarkParserGetErrorMessage(long Parser)

Unsafe version of: RemarkParserGetErrorMessage

nLLVMRemarkStringGetDataback to summary
public static long nLLVMRemarkStringGetData(long String)

Unsafe version of: RemarkStringGetData

org.lwjgl.llvm back to summary

public final Class LLVMRemarks.Functions

extends Object
Class Inheritance

Contains the function pointers loaded from LLVMCore.getLibrary().

Field Summary

Modifier and TypeField and Description
public static final long
RemarkArgGetDebugLoc

Function address.

public static final long
RemarkArgGetKey

Function address.

public static final long
RemarkArgGetValue

Function address.

public static final long
public static final long
public static final long
RemarkDebugLocGetSourceLine

Function address.

public static final long
RemarkEntryDispose

Function address.

public static final long
RemarkEntryGetDebugLoc

Function address.

public static final long
RemarkEntryGetFirstArg

Function address.

public static final long
RemarkEntryGetFunctionName

Function address.

public static final long
RemarkEntryGetHotness

Function address.

public static final long
RemarkEntryGetNextArg

Function address.

public static final long
RemarkEntryGetNumArgs

Function address.

public static final long
RemarkEntryGetPassName

Function address.

public static final long
RemarkEntryGetRemarkName

Function address.

public static final long
RemarkEntryGetType

Function address.

public static final long
RemarkParserCreateBitstream

Function address.

public static final long
RemarkParserCreateYAML

Function address.

public static final long
RemarkParserDispose

Function address.

public static final long
RemarkParserGetErrorMessage

Function address.

public static final long
RemarkParserGetNext

Function address.

public static final long
RemarkParserHasError

Function address.

public static final long
RemarkStringGetData

Function address.

public static final long
RemarkStringGetLen

Function address.

public static final long
RemarkVersion

Function address.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

RemarkArgGetDebugLocback to summary
public static final long RemarkArgGetDebugLoc

Function address.

RemarkArgGetKeyback to summary
public static final long RemarkArgGetKey

Function address.

RemarkArgGetValueback to summary
public static final long RemarkArgGetValue

Function address.

RemarkDebugLocGetSourceColumnback to summary
public static final long RemarkDebugLocGetSourceColumn

Function address.

RemarkDebugLocGetSourceFilePathback to summary
public static final long RemarkDebugLocGetSourceFilePath

Function address.

RemarkDebugLocGetSourceLineback to summary
public static final long RemarkDebugLocGetSourceLine

Function address.

RemarkEntryDisposeback to summary
public static final long RemarkEntryDispose

Function address.

RemarkEntryGetDebugLocback to summary
public static final long RemarkEntryGetDebugLoc

Function address.

RemarkEntryGetFirstArgback to summary
public static final long RemarkEntryGetFirstArg

Function address.

RemarkEntryGetFunctionNameback to summary
public static final long RemarkEntryGetFunctionName

Function address.

RemarkEntryGetHotnessback to summary
public static final long RemarkEntryGetHotness

Function address.

RemarkEntryGetNextArgback to summary
public static final long RemarkEntryGetNextArg

Function address.

RemarkEntryGetNumArgsback to summary
public static final long RemarkEntryGetNumArgs

Function address.

RemarkEntryGetPassNameback to summary
public static final long RemarkEntryGetPassName

Function address.

RemarkEntryGetRemarkNameback to summary
public static final long RemarkEntryGetRemarkName

Function address.

RemarkEntryGetTypeback to summary
public static final long RemarkEntryGetType

Function address.

RemarkParserCreateBitstreamback to summary
public static final long RemarkParserCreateBitstream

Function address.

RemarkParserCreateYAMLback to summary
public static final long RemarkParserCreateYAML

Function address.

RemarkParserDisposeback to summary
public static final long RemarkParserDispose

Function address.

RemarkParserGetErrorMessageback to summary
public static final long RemarkParserGetErrorMessage

Function address.

RemarkParserGetNextback to summary
public static final long RemarkParserGetNext

Function address.

RemarkParserHasErrorback to summary
public static final long RemarkParserHasError

Function address.

RemarkStringGetDataback to summary
public static final long RemarkStringGetData

Function address.

RemarkStringGetLenback to summary
public static final long RemarkStringGetLen

Function address.

RemarkVersionback to summary
public static final long RemarkVersion

Function address.

Constructor Detail

Functionsback to summary
private Functions()