Class LLVMTargetMachine


  • public class LLVMTargetMachine
    extends java.lang.Object
    • Method Detail

      • 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​(java.nio.ByteBuffer Name)
        
        public static long LLVMGetTargetFromName​(java.lang.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​(java.nio.ByteBuffer Triple,
                                                      PointerBuffer T,
                                                      PointerBuffer ErrorMessage)
        
        public static boolean LLVMGetTargetFromTriple​(java.lang.CharSequence Triple,
                                                      PointerBuffer T,
                                                      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

        @Nullable
        public static java.lang.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

        @Nullable
        public static java.lang.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)
      • 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 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

        @Nullable
        public static java.lang.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

        @Nullable
        public static java.lang.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

        @Nullable
        public static java.lang.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.
      • 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,
                                                          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,
                                                                  PointerBuffer ErrorMessage,
                                                                  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

        @Nullable
        public static java.lang.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

        @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 with DisposeMessage.
      • 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 with DisposeMessage.
      • 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 with DisposeMessage.
      • LLVMAddAnalysisPasses

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