Class LLVMTargetMachine

java.lang.Object
org.lwjgl.llvm.LLVMTargetMachine

public class LLVMTargetMachine extends Object
  • Field Details

  • Method Details

    • LLVMGetFirstTarget

      public static long LLVMGetFirstTarget()
      Returns the first llvm::Target in the registered targets list.
    • LLVMGetNextTarget

      public static long LLVMGetNextTarget(long T)
      Returns the next llvm::Target given 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(ByteBuffer Name)
      Finds the target corresponding to the given name and stores it in T. Returns 0 on success.
    • LLVMGetTargetFromName

      public static long LLVMGetTargetFromName(CharSequence Name)
      Finds the target corresponding to the given name and stores it in T. 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 in T. Returns 0 on success. Optionally returns any error in ErrorMessage. Use DisposeMessage to 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 in T. Returns 0 on success. Optionally returns any error in ErrorMessage. Use DisposeMessage to dispose the message.
    • nLLVMGetTargetName

      public static long nLLVMGetTargetName(long T)
      Unsafe version of: GetTargetName
    • LLVMGetTargetName

      public static @Nullable String LLVMGetTargetName(long T)
      Returns the name of a target. See llvm::Target::getName
    • nLLVMGetTargetDescription

      public static long nLLVMGetTargetDescription(long T)
      Unsafe version of: GetTargetDescription
    • LLVMGetTargetDescription

      public static @Nullable String LLVMGetTargetDescription(long T)
      Returns the description of a target. See llvm::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 a TargetMachine associated
    • 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 an llvm::TargetMachine.

      The returned option structure must be released with DisposeTargetMachineOptions after the call to LLVMCreateTargetMachineWithOptions().

      Since:
      18
    • LLVMDisposeTargetMachineOptions

      public static void LLVMDisposeTargetMachineOptions(long Options)
      Dispose of an LLVMTargetMachineOptionsRef instance.
      Since:
      18
    • nLLVMTargetMachineOptionsSetCPU

      public static void nLLVMTargetMachineOptionsSetCPU(long Options, long CPU)
      Unsafe version of: TargetMachineOptionsSetCPU
    • LLVMTargetMachineOptionsSetCPU

      public static void LLVMTargetMachineOptionsSetCPU(long Options, ByteBuffer CPU)
      Since:
      18
    • LLVMTargetMachineOptionsSetCPU

      public static void LLVMTargetMachineOptionsSetCPU(long Options, CharSequence CPU)
      Since:
      18
    • nLLVMTargetMachineOptionsSetFeatures

      public static void nLLVMTargetMachineOptionsSetFeatures(long Options, long Features)
    • LLVMTargetMachineOptionsSetFeatures

      public static void LLVMTargetMachineOptionsSetFeatures(long Options, ByteBuffer Features)
      Set the list of features for the target machine.
      Parameters:
      Features - a comma-separated list of features
      Since:
      18
    • LLVMTargetMachineOptionsSetFeatures

      public static void LLVMTargetMachineOptionsSetFeatures(long Options, CharSequence Features)
      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

      public static void LLVMTargetMachineOptionsSetABI(long Options, ByteBuffer ABI)
      Since:
      18
    • LLVMTargetMachineOptionsSetABI

      public static void LLVMTargetMachineOptionsSetABI(long Options, CharSequence ABI)
      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)
    • LLVMCreateTargetMachineWithOptions

      public static long LLVMCreateTargetMachineWithOptions(long T, ByteBuffer Triple, long Options)
      Create a new llvm::TargetMachine.
      Parameters:
      T - the target to create a machine for
      Triple - a triple describing the target machine
      Options - additional configuration
      Since:
      18
    • LLVMCreateTargetMachineWithOptions

      public static long LLVMCreateTargetMachineWithOptions(long T, CharSequence Triple, long Options)
      Create a new llvm::TargetMachine.
      Parameters:
      T - the target to create a machine for
      Triple - a triple describing the target machine
      Options - 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 new llvm::TargetMachine. See llvm::Target::createTargetMachine
    • LLVMCreateTargetMachine

      public static long LLVMCreateTargetMachine(long T, CharSequence Triple, CharSequence CPU, CharSequence Features, int Level, int Reloc, int CodeModel)
      Creates a new llvm::TargetMachine. See llvm::Target::createTargetMachine
    • LLVMDisposeTargetMachine

      public static void LLVMDisposeTargetMachine(long T)
      Dispose the LLVMTargetMachineRef instance generated by CreateTargetMachine.
    • LLVMGetTargetMachineTarget

      public static long LLVMGetTargetMachineTarget(long T)
      Returns the Target used in a TargetMachine
    • nLLVMGetTargetMachineTriple

      public static long nLLVMGetTargetMachineTriple(long T)
      Unsafe version of: GetTargetMachineTriple
    • LLVMGetTargetMachineTriple

      public static @Nullable String LLVMGetTargetMachineTriple(long T)
      Returns the triple used creating this target machine. See llvm::TargetMachine::getTriple. The result needs to be disposed with DisposeMessage.
    • nLLVMGetTargetMachineCPU

      public static long nLLVMGetTargetMachineCPU(long T)
      Unsafe version of: GetTargetMachineCPU
    • LLVMGetTargetMachineCPU

      public static @Nullable String LLVMGetTargetMachineCPU(long T)
      Returns the cpu used creating this target machine. See llvm::TargetMachine::getCPU. The result needs to be disposed with DisposeMessage.
    • nLLVMGetTargetMachineFeatureString

      public static long nLLVMGetTargetMachineFeatureString(long T)
    • LLVMGetTargetMachineFeatureString

      public static @Nullable String LLVMGetTargetMachineFeatureString(long T)
      Returns the feature string used creating this target machine. See llvm::TargetMachine::getFeatureString. The result needs to be disposed with DisposeMessage.
    • LLVMCreateTargetDataLayout

      public static long LLVMCreateTargetDataLayout(long T)
      Create a DataLayout based 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 the MachineOutliner pass.
      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 in ErrorMessage. Use DisposeMessage to 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 in ErrorMessage. Use DisposeMessage to dispose the message.
    • nLLVMTargetMachineEmitToMemoryBuffer

      public static int nLLVMTargetMachineEmitToMemoryBuffer(long T, long M, int codegen, long ErrorMessage, long OutMemBuf)
    • LLVMTargetMachineEmitToMemoryBuffer

      public static boolean LLVMTargetMachineEmitToMemoryBuffer(long T, long M, int codegen, org.lwjgl.PointerBuffer ErrorMessage, org.lwjgl.PointerBuffer OutMemBuf)
      Compile the LLVM IR stored in M and store the result in OutMemBuf.
    • nLLVMGetDefaultTargetTriple

      public static long nLLVMGetDefaultTargetTriple()
      Unsafe version of: GetDefaultTargetTriple
    • LLVMGetDefaultTargetTriple

      public static @Nullable String LLVMGetDefaultTargetTriple()
      Get a triple for the host machine as a string. The result needs to be disposed with DisposeMessage.
    • nLLVMNormalizeTargetTriple

      public static long nLLVMNormalizeTargetTriple(long triple)
      Unsafe version of: NormalizeTargetTriple
    • LLVMNormalizeTargetTriple

      public static @Nullable String LLVMNormalizeTargetTriple(ByteBuffer triple)
      Normalize a target triple. The result needs to be disposed with DisposeMessage.
    • LLVMNormalizeTargetTriple

      public static @Nullable String LLVMNormalizeTargetTriple(CharSequence triple)
      Normalize a target triple. The result needs to be disposed with DisposeMessage.
    • nLLVMGetHostCPUName

      public static long nLLVMGetHostCPUName()
      Unsafe version of: GetHostCPUName
    • LLVMGetHostCPUName

      public static @Nullable String LLVMGetHostCPUName()
      Get the host CPU as a string. The result needs to be disposed with DisposeMessage.
    • nLLVMGetHostCPUFeatures

      public static long nLLVMGetHostCPUFeatures()
      Unsafe version of: GetHostCPUFeatures
    • LLVMGetHostCPUFeatures

      public static @Nullable String LLVMGetHostCPUFeatures()
      Get the host CPU's features as a string. The result needs to be disposed with DisposeMessage.
    • LLVMAddAnalysisPasses

      public static void LLVMAddAnalysisPasses(long T, long PM)
      Adds the target-specific analysis passes to the pass manager.