Package org.lwjgl.llvm
Class LLVMTargetMachine
- java.lang.Object
-
- org.lwjgl.llvm.LLVMTargetMachine
-
public class LLVMTargetMachine extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLLVMTargetMachine.FunctionsContains the function pointers loaded fromLLVMCore.getLibrary().
-
Field Summary
Fields Modifier and Type Field Description static intLLVMAssemblyFileLLVMCodeGenFileTypestatic intLLVMCodeGenLevelAggressive
LLVMCodeGenLevelDefault
LLVMCodeGenLevelLess
LLVMCodeGenLevelNoneLLVMCodeGenOptLevelstatic intLLVMCodeModelDefault
LLVMCodeModelJITDefault
LLVMCodeModelKernel
LLVMCodeModelLarge
LLVMCodeModelMedium
LLVMCodeModelSmall
LLVMCodeModelTinyLLVMCodeModelstatic intLLVMObjectFileLLVMCodeGenFileTypestatic intLLVMRelocDefault
LLVMRelocDynamicNoPic
LLVMRelocPIC
LLVMRelocROPI
LLVMRelocROPI_RWPI
LLVMRelocRWPI
LLVMRelocStaticLLVMRelocMode
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidLLVMAddAnalysisPasses(long T, long PM)Adds the target-specific analysis passes to the pass manager.static longLLVMCreateTargetDataLayout(long T)Create aDataLayoutbased on the target machine.static longLLVMCreateTargetMachine(long T, java.lang.CharSequence Triple, java.lang.CharSequence CPU, java.lang.CharSequence Features, int Level, int Reloc, int CodeModel)Creates a newllvm::TargetMachine.static longLLVMCreateTargetMachine(long T, java.nio.ByteBuffer Triple, java.nio.ByteBuffer CPU, java.nio.ByteBuffer Features, int Level, int Reloc, int CodeModel)Creates a newllvm::TargetMachine.static voidLLVMDisposeTargetMachine(long T)Dispose theLLVMTargetMachineRefinstance generated byCreateTargetMachine.static java.lang.StringLLVMGetDefaultTargetTriple()Get a triple for the host machine as a string.static longLLVMGetFirstTarget()Returns the firstllvm::Targetin the registered targets list.static java.lang.StringLLVMGetHostCPUFeatures()Get the host CPU's features as a string.static java.lang.StringLLVMGetHostCPUName()Get the host CPU as a string.static longLLVMGetNextTarget(long T)Returns the nextllvm::Targetgiven a previous one (or null if there's none)static java.lang.StringLLVMGetTargetDescription(long T)Returns the description of a target.static longLLVMGetTargetFromName(java.lang.CharSequence Name)Finds the target corresponding to the given name and stores it inT.static longLLVMGetTargetFromName(java.nio.ByteBuffer Name)Finds the target corresponding to the given name and stores it inT.static booleanLLVMGetTargetFromTriple(java.lang.CharSequence Triple, org.lwjgl.PointerBuffer T, org.lwjgl.PointerBuffer ErrorMessage)Finds the target corresponding to the given triple and stores it inT.static booleanLLVMGetTargetFromTriple(java.nio.ByteBuffer Triple, org.lwjgl.PointerBuffer T, org.lwjgl.PointerBuffer ErrorMessage)Finds the target corresponding to the given triple and stores it inT.static java.lang.StringLLVMGetTargetMachineCPU(long T)Returns the cpu used creating this target machine.static java.lang.StringLLVMGetTargetMachineFeatureString(long T)Returns the feature string used creating this target machine.static longLLVMGetTargetMachineTarget(long T)Returns theTargetused in aTargetMachinestatic java.lang.StringLLVMGetTargetMachineTriple(long T)Returns the triple used creating this target machine.static java.lang.StringLLVMGetTargetName(long T)Returns the name of a target.static java.lang.StringLLVMNormalizeTargetTriple(java.lang.CharSequence triple)Normalize a target triple.static java.lang.StringLLVMNormalizeTargetTriple(java.nio.ByteBuffer triple)Normalize a target triple.static voidLLVMSetTargetMachineAsmVerbosity(long T, boolean VerboseAsm)Set the target machine's ASM verbosity.static booleanLLVMTargetHasAsmBackend(long T)Returns if the target as an ASM backend (required for emitting output)static booleanLLVMTargetHasJIT(long T)Returns if the target has a JITstatic booleanLLVMTargetHasTargetMachine(long T)Returns if the target has aTargetMachineassociatedstatic booleanLLVMTargetMachineEmitToFile(long T, long M, java.nio.ByteBuffer Filename, int codegen, org.lwjgl.PointerBuffer ErrorMessage)Emits an asm or object file for the given module to the filename.static booleanLLVMTargetMachineEmitToMemoryBuffer(long T, long M, int codegen, org.lwjgl.PointerBuffer ErrorMessage, org.lwjgl.PointerBuffer OutMemBuf)Compile the LLVM IR stored inMand store the result inOutMemBuf.static longnLLVMCreateTargetMachine(long T, long Triple, long CPU, long Features, int Level, int Reloc, int CodeModel)Unsafe version of:CreateTargetMachinestatic longnLLVMGetDefaultTargetTriple()Unsafe version of:GetDefaultTargetTriplestatic longnLLVMGetHostCPUFeatures()Unsafe version of:GetHostCPUFeaturesstatic longnLLVMGetHostCPUName()Unsafe version of:GetHostCPUNamestatic longnLLVMGetTargetDescription(long T)Unsafe version of:GetTargetDescriptionstatic longnLLVMGetTargetFromName(long Name)Unsafe version of:GetTargetFromNamestatic intnLLVMGetTargetFromTriple(long Triple, long T, long ErrorMessage)Unsafe version of:GetTargetFromTriplestatic longnLLVMGetTargetMachineCPU(long T)Unsafe version of:GetTargetMachineCPUstatic longnLLVMGetTargetMachineFeatureString(long T)Unsafe version of:GetTargetMachineFeatureStringstatic longnLLVMGetTargetMachineTriple(long T)Unsafe version of:GetTargetMachineTriplestatic longnLLVMGetTargetName(long T)Unsafe version of:GetTargetNamestatic longnLLVMNormalizeTargetTriple(long triple)Unsafe version of:NormalizeTargetTriplestatic intnLLVMTargetMachineEmitToFile(long T, long M, long Filename, int codegen, long ErrorMessage)Unsafe version of:TargetMachineEmitToFilestatic intnLLVMTargetMachineEmitToMemoryBuffer(long T, long M, int codegen, long ErrorMessage, long OutMemBuf)Unsafe version of:TargetMachineEmitToMemoryBuffer
-
-
-
Field Detail
-
LLVMCodeGenLevelNone, LLVMCodeGenLevelLess, LLVMCodeGenLevelDefault, LLVMCodeGenLevelAggressive
LLVMCodeGenOptLevelEnum values:
-
LLVMRelocDefault, LLVMRelocStatic, LLVMRelocPIC, LLVMRelocDynamicNoPic, LLVMRelocROPI, LLVMRelocRWPI, LLVMRelocROPI_RWPI
LLVMRelocModeEnum values:
-
LLVMCodeModelDefault, LLVMCodeModelJITDefault, LLVMCodeModelTiny, LLVMCodeModelSmall, LLVMCodeModelKernel, LLVMCodeModelMedium, LLVMCodeModelLarge
LLVMCodeModelEnum values:
-
-
Method Detail
-
LLVMGetFirstTarget
public static long LLVMGetFirstTarget()
Returns the firstllvm::Targetin the registered targets list.
-
LLVMGetNextTarget
public static long LLVMGetNextTarget(long T)
Returns the nextllvm::Targetgiven a previous one (or null if there's none)
-
nLLVMGetTargetFromName
public static long nLLVMGetTargetFromName(long Name)
Unsafe version of:GetTargetFromName
-
LLVMGetTargetFromName
public static long LLVMGetTargetFromName(java.nio.ByteBuffer Name) public static long LLVMGetTargetFromName(java.lang.CharSequence Name)
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(java.nio.ByteBuffer Triple, org.lwjgl.PointerBuffer T, org.lwjgl.PointerBuffer ErrorMessage) public static boolean LLVMGetTargetFromTriple(java.lang.CharSequence Triple, org.lwjgl.PointerBuffer T, org.lwjgl.PointerBuffer ErrorMessage)Finds the target corresponding to the given triple and stores it inT. Returns 0 on success. Optionally returns any error inErrorMessage. UseDisposeMessageto dispose the message.
-
nLLVMGetTargetName
public static long nLLVMGetTargetName(long T)
Unsafe version of:GetTargetName
-
LLVMGetTargetName
@Nullable public static java.lang.String LLVMGetTargetName(long T)
Returns the name of a target. Seellvm::Target::getName
-
nLLVMGetTargetDescription
public static long nLLVMGetTargetDescription(long T)
Unsafe version of:GetTargetDescription
-
LLVMGetTargetDescription
@Nullable public static java.lang.String LLVMGetTargetDescription(long T)
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 aTargetMachineassociated
-
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, java.nio.ByteBuffer Triple, java.nio.ByteBuffer CPU, java.nio.ByteBuffer Features, int Level, int Reloc, int CodeModel) public static long LLVMCreateTargetMachine(long T, java.lang.CharSequence Triple, java.lang.CharSequence CPU, java.lang.CharSequence Features, int Level, int Reloc, int CodeModel)Creates a newllvm::TargetMachine. Seellvm::Target::createTargetMachine
-
LLVMDisposeTargetMachine
public static void LLVMDisposeTargetMachine(long T)
Dispose theLLVMTargetMachineRefinstance generated byCreateTargetMachine.
-
LLVMGetTargetMachineTarget
public static long LLVMGetTargetMachineTarget(long T)
Returns theTargetused in aTargetMachine
-
nLLVMGetTargetMachineTriple
public static long nLLVMGetTargetMachineTriple(long T)
Unsafe version of:GetTargetMachineTriple
-
LLVMGetTargetMachineTriple
@Nullable public static java.lang.String LLVMGetTargetMachineTriple(long T)
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
@Nullable public static java.lang.String LLVMGetTargetMachineCPU(long T)
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
@Nullable public static java.lang.String LLVMGetTargetMachineFeatureString(long T)
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 aDataLayoutbased 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, java.nio.ByteBuffer Filename, int codegen, org.lwjgl.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. UseDisposeMessageto 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, org.lwjgl.PointerBuffer ErrorMessage, org.lwjgl.PointerBuffer OutMemBuf)Compile the LLVM IR stored inMand store the result inOutMemBuf.
-
nLLVMGetDefaultTargetTriple
public static long nLLVMGetDefaultTargetTriple()
Unsafe version of:GetDefaultTargetTriple
-
LLVMGetDefaultTargetTriple
@Nullable public static java.lang.String 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
@Nullable public static java.lang.String LLVMNormalizeTargetTriple(java.nio.ByteBuffer triple) @Nullable public static java.lang.String LLVMNormalizeTargetTriple(java.lang.CharSequence triple)
Normalize a target triple. The result needs to be disposed withDisposeMessage.
-
nLLVMGetHostCPUName
public static long nLLVMGetHostCPUName()
Unsafe version of:GetHostCPUName
-
LLVMGetHostCPUName
@Nullable public static java.lang.String 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
@Nullable public static java.lang.String 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.
-
-