Package org.lwjgl.llvm
Class LLVMTargetMachine
java.lang.Object
org.lwjgl.llvm.LLVMTargetMachine
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Contains the function pointers loaded fromLLVMCore.getLibrary()
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
LLVMCodeGenFileType
static final int
LLVMCodeGenOptLevel
static final int
LLVMCodeGenOptLevel
static final int
LLVMCodeGenOptLevel
static final int
LLVMCodeGenOptLevel
static final int
LLVMCodeModel
static final int
LLVMCodeModel
static final int
LLVMCodeModel
static final int
LLVMCodeModel
static final int
LLVMCodeModel
static final int
LLVMCodeModel
static final int
LLVMCodeModel
static final int
LLVMCodeGenFileType
static final int
LLVMRelocMode
static final int
LLVMRelocMode
static final int
LLVMRelocMode
static final int
LLVMRelocMode
static final int
LLVMRelocMode
static final int
LLVMRelocMode
static final int
LLVMRelocMode
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
LLVMAddAnalysisPasses
(long T, long PM) Adds the target-specific analysis passes to the pass manager.static long
LLVMCreateTargetDataLayout
(long T) Create aDataLayout
based on the target machine.static long
LLVMCreateTargetMachine
(long T, CharSequence Triple, CharSequence CPU, CharSequence Features, int Level, int Reloc, int CodeModel) Creates a newllvm::TargetMachine
.static long
LLVMCreateTargetMachine
(long T, ByteBuffer Triple, ByteBuffer CPU, ByteBuffer Features, int Level, int Reloc, int CodeModel) Creates a newllvm::TargetMachine
.static void
LLVMDisposeTargetMachine
(long T) Dispose theLLVMTargetMachineRef
instance generated byCreateTargetMachine
.static String
Get a triple for the host machine as a string.static long
Returns the firstllvm::Target
in the registered targets list.static String
Get the host CPU's features as a string.static String
Get the host CPU as a string.static long
LLVMGetNextTarget
(long T) Returns the nextllvm::Target
given a previous one (or null if there's none)static String
LLVMGetTargetDescription
(long T) Returns the description of a target.static long
Finds the target corresponding to the given name and stores it inT
.static long
Finds the target corresponding to the given name and stores it inT
.static boolean
LLVMGetTargetFromTriple
(CharSequence Triple, PointerBuffer T, PointerBuffer ErrorMessage) Finds the target corresponding to the given triple and stores it inT
.static boolean
LLVMGetTargetFromTriple
(ByteBuffer Triple, PointerBuffer T, PointerBuffer ErrorMessage) Finds the target corresponding to the given triple and stores it inT
.static String
LLVMGetTargetMachineCPU
(long T) Returns the cpu used creating this target machine.static String
Returns the feature string used creating this target machine.static long
LLVMGetTargetMachineTarget
(long T) Returns theTarget
used in aTargetMachine
static String
LLVMGetTargetMachineTriple
(long T) Returns the triple used creating this target machine.static String
LLVMGetTargetName
(long T) Returns the name of a target.static String
Normalize a target triple.static String
LLVMNormalizeTargetTriple
(ByteBuffer triple) Normalize a target triple.static void
LLVMSetTargetMachineAsmVerbosity
(long T, boolean VerboseAsm) Set the target machine's ASM verbosity.static boolean
LLVMTargetHasAsmBackend
(long T) Returns if the target as an ASM backend (required for emitting output)static boolean
LLVMTargetHasJIT
(long T) Returns if the target has a JITstatic boolean
LLVMTargetHasTargetMachine
(long T) Returns if the target has aTargetMachine
associatedstatic boolean
LLVMTargetMachineEmitToFile
(long T, long M, CharSequence Filename, int codegen, PointerBuffer ErrorMessage) Emits an asm or object file for the given module to the filename.static boolean
LLVMTargetMachineEmitToFile
(long T, long M, ByteBuffer Filename, int codegen, PointerBuffer ErrorMessage) Emits an asm or object file for the given module to the filename.static boolean
LLVMTargetMachineEmitToMemoryBuffer
(long T, long M, int codegen, PointerBuffer ErrorMessage, PointerBuffer OutMemBuf) Compile the LLVM IR stored inM
and store the result inOutMemBuf
.static long
nLLVMCreateTargetMachine
(long T, long Triple, long CPU, long Features, int Level, int Reloc, int CodeModel) Unsafe version of:CreateTargetMachine
static long
Unsafe version of:GetDefaultTargetTriple
static long
Unsafe version of:GetHostCPUFeatures
static long
Unsafe version of:GetHostCPUName
static long
nLLVMGetTargetDescription
(long T) Unsafe version of:GetTargetDescription
static long
nLLVMGetTargetFromName
(long Name) Unsafe version of:GetTargetFromName
static int
nLLVMGetTargetFromTriple
(long Triple, long T, long ErrorMessage) Unsafe version of:GetTargetFromTriple
static long
nLLVMGetTargetMachineCPU
(long T) Unsafe version of:GetTargetMachineCPU
static long
Unsafe version of:GetTargetMachineFeatureString
static long
nLLVMGetTargetMachineTriple
(long T) Unsafe version of:GetTargetMachineTriple
static long
nLLVMGetTargetName
(long T) Unsafe version of:GetTargetName
static long
nLLVMNormalizeTargetTriple
(long triple) Unsafe version of:NormalizeTargetTriple
static int
nLLVMTargetMachineEmitToFile
(long T, long M, long Filename, int codegen, long ErrorMessage) Unsafe version of:TargetMachineEmitToFile
static int
nLLVMTargetMachineEmitToMemoryBuffer
(long T, long M, int codegen, long ErrorMessage, long OutMemBuf) Unsafe version of:TargetMachineEmitToMemoryBuffer
-
Field Details
-
LLVMCodeGenLevelNone
public static final int LLVMCodeGenLevelNoneLLVMCodeGenOptLevel
Enum values:
- See Also:
-
LLVMCodeGenLevelLess
public static final int LLVMCodeGenLevelLessLLVMCodeGenOptLevel
Enum values:
- See Also:
-
LLVMCodeGenLevelDefault
public static final int LLVMCodeGenLevelDefaultLLVMCodeGenOptLevel
Enum values:
- See Also:
-
LLVMCodeGenLevelAggressive
public static final int LLVMCodeGenLevelAggressiveLLVMCodeGenOptLevel
Enum values:
- See Also:
-
LLVMRelocDefault
public static final int LLVMRelocDefaultLLVMRelocMode
Enum values:
- See Also:
-
LLVMRelocStatic
public static final int LLVMRelocStaticLLVMRelocMode
Enum values:
- See Also:
-
LLVMRelocPIC
public static final int LLVMRelocPICLLVMRelocMode
Enum values:
- See Also:
-
LLVMRelocDynamicNoPic
public static final int LLVMRelocDynamicNoPicLLVMRelocMode
Enum values:
- See Also:
-
LLVMRelocROPI
public static final int LLVMRelocROPILLVMRelocMode
Enum values:
- See Also:
-
LLVMRelocRWPI
public static final int LLVMRelocRWPILLVMRelocMode
Enum values:
- See Also:
-
LLVMRelocROPI_RWPI
public static final int LLVMRelocROPI_RWPILLVMRelocMode
Enum values:
- See Also:
-
LLVMCodeModelDefault
public static final int LLVMCodeModelDefaultLLVMCodeModel
Enum values:
- See Also:
-
LLVMCodeModelJITDefault
public static final int LLVMCodeModelJITDefaultLLVMCodeModel
Enum values:
- See Also:
-
LLVMCodeModelTiny
public static final int LLVMCodeModelTinyLLVMCodeModel
Enum values:
- See Also:
-
LLVMCodeModelSmall
public static final int LLVMCodeModelSmallLLVMCodeModel
Enum values:
- See Also:
-
LLVMCodeModelKernel
public static final int LLVMCodeModelKernelLLVMCodeModel
Enum values:
- See Also:
-
LLVMCodeModelMedium
public static final int LLVMCodeModelMediumLLVMCodeModel
Enum values:
- See Also:
-
LLVMCodeModelLarge
public static final int LLVMCodeModelLargeLLVMCodeModel
Enum values:
- See Also:
-
LLVMAssemblyFile
public static final int LLVMAssemblyFile- See Also:
-
LLVMObjectFile
public static final int LLVMObjectFile- See Also:
-
-
Method Details
-
LLVMGetFirstTarget
public static long LLVMGetFirstTarget()Returns the firstllvm::Target
in the registered targets list. -
LLVMGetNextTarget
public static long LLVMGetNextTarget(long T) Returns the nextllvm::Target
given a previous one (or null if there's none) -
nLLVMGetTargetFromName
public static long nLLVMGetTargetFromName(long Name) Unsafe version of:GetTargetFromName
-
LLVMGetTargetFromName
Finds the target corresponding to the given name and stores it inT
. Returns 0 on success. -
LLVMGetTargetFromName
Finds the target corresponding to the given name and stores it inT
. Returns 0 on success. -
nLLVMGetTargetFromTriple
public static int nLLVMGetTargetFromTriple(long Triple, long T, long ErrorMessage) Unsafe version of:GetTargetFromTriple
-
LLVMGetTargetFromTriple
public static boolean LLVMGetTargetFromTriple(ByteBuffer Triple, PointerBuffer T, PointerBuffer ErrorMessage) Finds the target corresponding to the given triple and stores it inT
. Returns 0 on success. Optionally returns any error inErrorMessage
. UseDisposeMessage
to dispose the message. -
LLVMGetTargetFromTriple
public static boolean LLVMGetTargetFromTriple(CharSequence Triple, PointerBuffer T, PointerBuffer ErrorMessage) Finds the target corresponding to the given triple and stores it inT
. Returns 0 on success. Optionally returns any error inErrorMessage
. UseDisposeMessage
to dispose the message. -
nLLVMGetTargetName
public static long nLLVMGetTargetName(long T) Unsafe version of:GetTargetName
-
LLVMGetTargetName
Returns the name of a target. Seellvm::Target::getName
-
nLLVMGetTargetDescription
public static long nLLVMGetTargetDescription(long T) Unsafe version of:GetTargetDescription
-
LLVMGetTargetDescription
Returns the description of a target. Seellvm::Target::getDescription
-
LLVMTargetHasJIT
public static boolean LLVMTargetHasJIT(long T) Returns if the target has a JIT -
LLVMTargetHasTargetMachine
public static boolean LLVMTargetHasTargetMachine(long T) Returns if the target has aTargetMachine
associated -
LLVMTargetHasAsmBackend
public static boolean LLVMTargetHasAsmBackend(long T) Returns if the target as an ASM backend (required for emitting output) -
nLLVMCreateTargetMachine
public static long nLLVMCreateTargetMachine(long T, long Triple, long CPU, long Features, int Level, int Reloc, int CodeModel) Unsafe version of:CreateTargetMachine
-
LLVMCreateTargetMachine
public static long LLVMCreateTargetMachine(long T, ByteBuffer Triple, ByteBuffer CPU, ByteBuffer Features, int Level, int Reloc, int CodeModel) Creates a newllvm::TargetMachine
. Seellvm::Target::createTargetMachine
-
LLVMCreateTargetMachine
public static long LLVMCreateTargetMachine(long T, CharSequence Triple, CharSequence CPU, CharSequence Features, int Level, int Reloc, int CodeModel) Creates a newllvm::TargetMachine
. Seellvm::Target::createTargetMachine
-
LLVMDisposeTargetMachine
public static void LLVMDisposeTargetMachine(long T) Dispose theLLVMTargetMachineRef
instance generated byCreateTargetMachine
. -
LLVMGetTargetMachineTarget
public static long LLVMGetTargetMachineTarget(long T) Returns theTarget
used in aTargetMachine
-
nLLVMGetTargetMachineTriple
public static long nLLVMGetTargetMachineTriple(long T) Unsafe version of:GetTargetMachineTriple
-
LLVMGetTargetMachineTriple
Returns the triple used creating this target machine. Seellvm::TargetMachine::getTriple
. The result needs to be disposed withDisposeMessage
. -
nLLVMGetTargetMachineCPU
public static long nLLVMGetTargetMachineCPU(long T) Unsafe version of:GetTargetMachineCPU
-
LLVMGetTargetMachineCPU
Returns the cpu used creating this target machine. Seellvm::TargetMachine::getCPU
. The result needs to be disposed withDisposeMessage
. -
nLLVMGetTargetMachineFeatureString
public static long nLLVMGetTargetMachineFeatureString(long T) Unsafe version of:GetTargetMachineFeatureString
-
LLVMGetTargetMachineFeatureString
Returns the feature string used creating this target machine. Seellvm::TargetMachine::getFeatureString
. The result needs to be disposed withDisposeMessage
. -
LLVMCreateTargetDataLayout
public static long LLVMCreateTargetDataLayout(long T) Create aDataLayout
based on the target machine. -
LLVMSetTargetMachineAsmVerbosity
public static void LLVMSetTargetMachineAsmVerbosity(long T, boolean VerboseAsm) Set the target machine's ASM verbosity. -
nLLVMTargetMachineEmitToFile
public static int nLLVMTargetMachineEmitToFile(long T, long M, long Filename, int codegen, long ErrorMessage) Unsafe version of:TargetMachineEmitToFile
-
LLVMTargetMachineEmitToFile
public static boolean LLVMTargetMachineEmitToFile(long T, long M, ByteBuffer Filename, int codegen, PointerBuffer ErrorMessage) Emits an asm or object file for the given module to the filename. This wraps several c++ only classes (among them a file stream). Returns any error inErrorMessage
. UseDisposeMessage
to dispose the message. -
LLVMTargetMachineEmitToFile
public static boolean LLVMTargetMachineEmitToFile(long T, long M, CharSequence Filename, int codegen, PointerBuffer ErrorMessage) Emits an asm or object file for the given module to the filename. This wraps several c++ only classes (among them a file stream). Returns any error inErrorMessage
. UseDisposeMessage
to dispose the message. -
nLLVMTargetMachineEmitToMemoryBuffer
public static int nLLVMTargetMachineEmitToMemoryBuffer(long T, long M, int codegen, long ErrorMessage, long OutMemBuf) Unsafe version of:TargetMachineEmitToMemoryBuffer
-
LLVMTargetMachineEmitToMemoryBuffer
public static boolean LLVMTargetMachineEmitToMemoryBuffer(long T, long M, int codegen, PointerBuffer ErrorMessage, PointerBuffer OutMemBuf) Compile the LLVM IR stored inM
and store the result inOutMemBuf
. -
nLLVMGetDefaultTargetTriple
public static long nLLVMGetDefaultTargetTriple()Unsafe version of:GetDefaultTargetTriple
-
LLVMGetDefaultTargetTriple
Get a triple for the host machine as a string. The result needs to be disposed withDisposeMessage
. -
nLLVMNormalizeTargetTriple
public static long nLLVMNormalizeTargetTriple(long triple) Unsafe version of:NormalizeTargetTriple
-
LLVMNormalizeTargetTriple
Normalize a target triple. The result needs to be disposed withDisposeMessage
. -
LLVMNormalizeTargetTriple
Normalize a target triple. The result needs to be disposed withDisposeMessage
. -
nLLVMGetHostCPUName
public static long nLLVMGetHostCPUName()Unsafe version of:GetHostCPUName
-
LLVMGetHostCPUName
Get the host CPU as a string. The result needs to be disposed withDisposeMessage
. -
nLLVMGetHostCPUFeatures
public static long nLLVMGetHostCPUFeatures()Unsafe version of:GetHostCPUFeatures
-
LLVMGetHostCPUFeatures
Get the host CPU's features as a string. The result needs to be disposed withDisposeMessage
. -
LLVMAddAnalysisPasses
public static void LLVMAddAnalysisPasses(long T, long PM) Adds the target-specific analysis passes to the pass manager.
-