Package org.lwjgl.llvm
Class LLVMTargetMachine
java.lang.Object
org.lwjgl.llvm.LLVMTargetMachine
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContains the function pointers loaded fromLLVMCore.getLibrary(). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intLLVMCodeGenFileTypestatic final intLLVMCodeGenOptLevelstatic final intLLVMCodeGenOptLevelstatic final intLLVMCodeGenOptLevelstatic final intLLVMCodeGenOptLevelstatic final intLLVMCodeModelstatic final intLLVMCodeModelstatic final intLLVMCodeModelstatic final intLLVMCodeModelstatic final intLLVMCodeModelstatic final intLLVMCodeModelstatic final intLLVMCodeModelstatic final intLLVMGlobalISelAbortModestatic final intLLVMGlobalISelAbortModestatic final intLLVMGlobalISelAbortModestatic final intLLVMCodeGenFileTypestatic final intLLVMRelocModestatic final intLLVMRelocModestatic final intLLVMRelocModestatic final intLLVMRelocModestatic final intLLVMRelocModestatic final intLLVMRelocModestatic final intLLVMRelocMode -
Method Summary
Modifier and TypeMethodDescriptionstatic 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, CharSequence Triple, CharSequence CPU, CharSequence Features, int Level, int Reloc, int CodeModel) Creates a newllvm::TargetMachine.static longLLVMCreateTargetMachine(long T, ByteBuffer Triple, ByteBuffer CPU, ByteBuffer Features, int Level, int Reloc, int CodeModel) Creates a newllvm::TargetMachine.static longCreate a new set of options for anllvm::TargetMachine.static longLLVMCreateTargetMachineWithOptions(long T, CharSequence Triple, long Options) Create a newllvm::TargetMachine.static longLLVMCreateTargetMachineWithOptions(long T, ByteBuffer Triple, long Options) Create a newllvm::TargetMachine.static voidLLVMDisposeTargetMachine(long T) Dispose theLLVMTargetMachineRefinstance generated byCreateTargetMachine.static voidLLVMDisposeTargetMachineOptions(long Options) Dispose of anLLVMTargetMachineOptionsRefinstance.static @Nullable StringGet a triple for the host machine as a string.static longReturns the firstllvm::Targetin the registered targets list.static @Nullable StringGet the host CPU's features as a string.static @Nullable StringGet the host CPU as a string.static longLLVMGetNextTarget(long T) Returns the nextllvm::Targetgiven a previous one (or null if there's none)static @Nullable StringLLVMGetTargetDescription(long T) Returns the description of a target.static longFinds the target corresponding to the given name and stores it inT.static longFinds the target corresponding to the given name and stores it inT.static booleanLLVMGetTargetFromTriple(CharSequence Triple, org.lwjgl.PointerBuffer T, org.lwjgl.PointerBuffer ErrorMessage) Finds the target corresponding to the given triple and stores it inT.static booleanLLVMGetTargetFromTriple(ByteBuffer Triple, org.lwjgl.PointerBuffer T, org.lwjgl.PointerBuffer ErrorMessage) Finds the target corresponding to the given triple and stores it inT.static @Nullable StringLLVMGetTargetMachineCPU(long T) Returns the cpu used creating this target machine.static @Nullable StringReturns the feature string used creating this target machine.static longLLVMGetTargetMachineTarget(long T) Returns theTargetused in aTargetMachinestatic @Nullable StringLLVMGetTargetMachineTriple(long T) Returns the triple used creating this target machine.static @Nullable StringLLVMGetTargetName(long T) Returns the name of a target.static @Nullable StringNormalize a target triple.static @Nullable StringLLVMNormalizeTargetTriple(ByteBuffer triple) Normalize a target triple.static voidLLVMSetTargetMachineAsmVerbosity(long T, boolean VerboseAsm) Set the target machine's ASM verbosity.static voidLLVMSetTargetMachineFastISel(long T, boolean Enable) Enable fast-path instruction selection.static voidLLVMSetTargetMachineGlobalISel(long T, boolean Enable) Enable global instruction selection.static voidLLVMSetTargetMachineGlobalISelAbort(long T, int Mode) Set abort behaviour when global instruction selection fails to lower/select an instruction.static voidLLVMSetTargetMachineMachineOutliner(long T, boolean Enable) Enable theMachineOutlinerpass.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, CharSequence Filename, int codegen, org.lwjgl.PointerBuffer ErrorMessage) Emits an asm or object file for the given module to the filename.static booleanLLVMTargetMachineEmitToFile(long T, long M, 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 voidLLVMTargetMachineOptionsSetABI(long Options, CharSequence ABI) static voidLLVMTargetMachineOptionsSetABI(long Options, ByteBuffer ABI) static voidLLVMTargetMachineOptionsSetCodeGenOptLevel(long Options, int Level) static voidLLVMTargetMachineOptionsSetCodeModel(long Options, int CodeModel) static voidLLVMTargetMachineOptionsSetCPU(long Options, CharSequence CPU) static voidLLVMTargetMachineOptionsSetCPU(long Options, ByteBuffer CPU) static voidLLVMTargetMachineOptionsSetFeatures(long Options, CharSequence Features) Set the list of features for the target machine.static voidLLVMTargetMachineOptionsSetFeatures(long Options, ByteBuffer Features) Set the list of features for the target machine.static voidLLVMTargetMachineOptionsSetRelocMode(long Options, int Reloc) static longnLLVMCreateTargetMachine(long T, long Triple, long CPU, long Features, int Level, int Reloc, int CodeModel) Unsafe version of:CreateTargetMachinestatic longnLLVMCreateTargetMachineWithOptions(long T, long Triple, long Options) Unsafe version of:CreateTargetMachineWithOptionsstatic longUnsafe version of:GetDefaultTargetTriplestatic longUnsafe version of:GetHostCPUFeaturesstatic longUnsafe 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 longUnsafe 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:TargetMachineEmitToMemoryBufferstatic voidnLLVMTargetMachineOptionsSetABI(long Options, long ABI) Unsafe version of:TargetMachineOptionsSetABIstatic voidnLLVMTargetMachineOptionsSetCPU(long Options, long CPU) Unsafe version of:TargetMachineOptionsSetCPUstatic voidnLLVMTargetMachineOptionsSetFeatures(long Options, long Features) Unsafe version of:TargetMachineOptionsSetFeatures
-
Field Details
-
LLVMCodeGenLevelNone
public static final int LLVMCodeGenLevelNoneLLVMCodeGenOptLevelEnum values:
- See Also:
-
LLVMCodeGenLevelLess
public static final int LLVMCodeGenLevelLessLLVMCodeGenOptLevelEnum values:
- See Also:
-
LLVMCodeGenLevelDefault
public static final int LLVMCodeGenLevelDefaultLLVMCodeGenOptLevelEnum values:
- See Also:
-
LLVMCodeGenLevelAggressive
public static final int LLVMCodeGenLevelAggressiveLLVMCodeGenOptLevelEnum values:
- See Also:
-
LLVMRelocDefault
public static final int LLVMRelocDefaultLLVMRelocModeEnum values:
- See Also:
-
LLVMRelocStatic
public static final int LLVMRelocStaticLLVMRelocModeEnum values:
- See Also:
-
LLVMRelocPIC
public static final int LLVMRelocPICLLVMRelocModeEnum values:
- See Also:
-
LLVMRelocDynamicNoPic
public static final int LLVMRelocDynamicNoPicLLVMRelocModeEnum values:
- See Also:
-
LLVMRelocROPI
public static final int LLVMRelocROPILLVMRelocModeEnum values:
- See Also:
-
LLVMRelocRWPI
public static final int LLVMRelocRWPILLVMRelocModeEnum values:
- See Also:
-
LLVMRelocROPI_RWPI
public static final int LLVMRelocROPI_RWPILLVMRelocModeEnum values:
- See Also:
-
LLVMCodeModelDefault
public static final int LLVMCodeModelDefaultLLVMCodeModelEnum values:
- See Also:
-
LLVMCodeModelJITDefault
public static final int LLVMCodeModelJITDefaultLLVMCodeModelEnum values:
- See Also:
-
LLVMCodeModelTiny
public static final int LLVMCodeModelTinyLLVMCodeModelEnum values:
- See Also:
-
LLVMCodeModelSmall
public static final int LLVMCodeModelSmallLLVMCodeModelEnum values:
- See Also:
-
LLVMCodeModelKernel
public static final int LLVMCodeModelKernelLLVMCodeModelEnum values:
- See Also:
-
LLVMCodeModelMedium
public static final int LLVMCodeModelMediumLLVMCodeModelEnum values:
- See Also:
-
LLVMCodeModelLarge
public static final int LLVMCodeModelLargeLLVMCodeModelEnum values:
- See Also:
-
LLVMAssemblyFile
public static final int LLVMAssemblyFile- See Also:
-
LLVMObjectFile
public static final int LLVMObjectFile- See Also:
-
LLVMGlobalISelAbortEnable
public static final int LLVMGlobalISelAbortEnableLLVMGlobalISelAbortModeEnum values:
- See Also:
-
LLVMGlobalISelAbortDisable
public static final int LLVMGlobalISelAbortDisableLLVMGlobalISelAbortModeEnum values:
- See Also:
-
LLVMGlobalISelAbortDisableWithDiag
public static final int LLVMGlobalISelAbortDisableWithDiagLLVMGlobalISelAbortModeEnum values:
- See Also:
-
-
Method Details
-
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
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, 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. -
LLVMGetTargetFromTriple
public static boolean LLVMGetTargetFromTriple(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
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 aTargetMachineassociated -
LLVMTargetHasAsmBackend
public static boolean LLVMTargetHasAsmBackend(long T) Returns if the target as an ASM backend (required for emitting output) -
LLVMCreateTargetMachineOptions
public static long LLVMCreateTargetMachineOptions()Create a new set of options for anllvm::TargetMachine.The returned option structure must be released with
DisposeTargetMachineOptionsafter the call toLLVMCreateTargetMachineWithOptions().- Since:
- 18
-
LLVMDisposeTargetMachineOptions
public static void LLVMDisposeTargetMachineOptions(long Options) Dispose of anLLVMTargetMachineOptionsRefinstance.- Since:
- 18
-
nLLVMTargetMachineOptionsSetCPU
public static void nLLVMTargetMachineOptionsSetCPU(long Options, long CPU) Unsafe version of:TargetMachineOptionsSetCPU -
LLVMTargetMachineOptionsSetCPU
- Since:
- 18
-
LLVMTargetMachineOptionsSetCPU
- Since:
- 18
-
nLLVMTargetMachineOptionsSetFeatures
public static void nLLVMTargetMachineOptionsSetFeatures(long Options, long Features) Unsafe version of:TargetMachineOptionsSetFeatures -
LLVMTargetMachineOptionsSetFeatures
Set the list of features for the target machine.- Parameters:
Features- a comma-separated list of features- Since:
- 18
-
LLVMTargetMachineOptionsSetFeatures
Set the list of features for the target machine.- Parameters:
Features- a comma-separated list of features- Since:
- 18
-
nLLVMTargetMachineOptionsSetABI
public static void nLLVMTargetMachineOptionsSetABI(long Options, long ABI) Unsafe version of:TargetMachineOptionsSetABI -
LLVMTargetMachineOptionsSetABI
- Since:
- 18
-
LLVMTargetMachineOptionsSetABI
- Since:
- 18
-
LLVMTargetMachineOptionsSetCodeGenOptLevel
public static void LLVMTargetMachineOptionsSetCodeGenOptLevel(long Options, int Level) - Since:
- 18
-
LLVMTargetMachineOptionsSetRelocMode
public static void LLVMTargetMachineOptionsSetRelocMode(long Options, int Reloc) - Since:
- 18
-
LLVMTargetMachineOptionsSetCodeModel
public static void LLVMTargetMachineOptionsSetCodeModel(long Options, int CodeModel) - Since:
- 18
-
nLLVMCreateTargetMachineWithOptions
public static long nLLVMCreateTargetMachineWithOptions(long T, long Triple, long Options) Unsafe version of:CreateTargetMachineWithOptions -
LLVMCreateTargetMachineWithOptions
Create a newllvm::TargetMachine.- Parameters:
T- the target to create a machine forTriple- a triple describing the target machineOptions- additional configuration- Since:
- 18
-
LLVMCreateTargetMachineWithOptions
Create a newllvm::TargetMachine.- Parameters:
T- the target to create a machine forTriple- a triple describing the target machineOptions- additional configuration- Since:
- 18
-
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 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
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 aDataLayoutbased on the target machine. -
LLVMSetTargetMachineAsmVerbosity
public static void LLVMSetTargetMachineAsmVerbosity(long T, boolean VerboseAsm) Set the target machine's ASM verbosity. -
LLVMSetTargetMachineFastISel
public static void LLVMSetTargetMachineFastISel(long T, boolean Enable) Enable fast-path instruction selection.- Since:
- 18
-
LLVMSetTargetMachineGlobalISel
public static void LLVMSetTargetMachineGlobalISel(long T, boolean Enable) Enable global instruction selection.- Since:
- 18
-
LLVMSetTargetMachineGlobalISelAbort
public static void LLVMSetTargetMachineGlobalISelAbort(long T, int Mode) Set abort behaviour when global instruction selection fails to lower/select an instruction.- Since:
- 18
-
LLVMSetTargetMachineMachineOutliner
public static void LLVMSetTargetMachineMachineOutliner(long T, boolean Enable) Enable theMachineOutlinerpass.- Since:
- 18
-
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, 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. -
LLVMTargetMachineEmitToFile
public static boolean LLVMTargetMachineEmitToFile(long T, long M, CharSequence 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
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.
-