Class LLVMExecutionEngine


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

      • LLVMLinkInMCJIT

        public static void LLVMLinkInMCJIT()
      • LLVMLinkInInterpreter

        public static void LLVMLinkInInterpreter()
      • LLVMCreateGenericValueOfInt

        public static long LLVMCreateGenericValueOfInt​(long Ty,
                                                       long N,
                                                       boolean IsSigned)
      • LLVMCreateGenericValueOfPointer

        public static long LLVMCreateGenericValueOfPointer​(long P)
      • LLVMCreateGenericValueOfFloat

        public static long LLVMCreateGenericValueOfFloat​(long Ty,
                                                         double N)
      • LLVMGenericValueIntWidth

        public static int LLVMGenericValueIntWidth​(long GenValRef)
      • LLVMGenericValueToInt

        public static long LLVMGenericValueToInt​(long GenVal,
                                                 boolean IsSigned)
      • LLVMGenericValueToPointer

        public static long LLVMGenericValueToPointer​(long GenVal)
      • LLVMGenericValueToFloat

        public static double LLVMGenericValueToFloat​(long TyRef,
                                                     long GenVal)
      • LLVMDisposeGenericValue

        public static void LLVMDisposeGenericValue​(long GenVal)
      • nLLVMCreateExecutionEngineForModule

        public static int nLLVMCreateExecutionEngineForModule​(long OutEE,
                                                              long M,
                                                              long OutError)
      • LLVMCreateExecutionEngineForModule

        public static boolean LLVMCreateExecutionEngineForModule​(PointerBuffer OutEE,
                                                                 long M,
                                                                 PointerBuffer OutError)
      • nLLVMCreateInterpreterForModule

        public static int nLLVMCreateInterpreterForModule​(long OutInterp,
                                                          long M,
                                                          long OutError)
      • LLVMCreateInterpreterForModule

        public static boolean LLVMCreateInterpreterForModule​(PointerBuffer OutInterp,
                                                             long M,
                                                             PointerBuffer OutError)
      • nLLVMCreateJITCompilerForModule

        public static int nLLVMCreateJITCompilerForModule​(long OutJIT,
                                                          long M,
                                                          int OptLevel,
                                                          long OutError)
      • LLVMCreateJITCompilerForModule

        public static boolean LLVMCreateJITCompilerForModule​(PointerBuffer OutJIT,
                                                             long M,
                                                             int OptLevel,
                                                             PointerBuffer OutError)
      • nLLVMInitializeMCJITCompilerOptions

        public static void nLLVMInitializeMCJITCompilerOptions​(long Options,
                                                               long SizeOfOptions)
      • nLLVMCreateMCJITCompilerForModule

        public static int nLLVMCreateMCJITCompilerForModule​(long OutJIT,
                                                            long M,
                                                            long Options,
                                                            long SizeOfOptions,
                                                            long OutError)
        Unsafe version of: CreateMCJITCompilerForModule
      • LLVMCreateMCJITCompilerForModule

        public static boolean LLVMCreateMCJITCompilerForModule​(PointerBuffer OutJIT,
                                                               long M,
                                                               LLVMMCJITCompilerOptions.Buffer Options,
                                                               PointerBuffer OutError)
        Create an MCJIT execution engine for a module, with the given options. It is the responsibility of the caller to ensure that all fields in Options up to the given SizeOfOptions are initialized. It is correct to pass a smaller value of SizeOfOptions that omits some fields. The canonical way of using this is:
        
         LLVMMCJITCompilerOptions options;
         LLVMInitializeMCJITCompilerOptions(&options, sizeof(options));
         ... fill in those options you care about
         LLVMCreateMCJITCompilerForModule(&jit, mod, &options, sizeof(options),
                                          &error);

        Note that this is also correct, though possibly suboptimal:

        
         LLVMCreateMCJITCompilerForModule(&jit, mod, 0, 0, &error);
      • LLVMDisposeExecutionEngine

        public static void LLVMDisposeExecutionEngine​(long EE)
      • LLVMRunStaticConstructors

        public static void LLVMRunStaticConstructors​(long EE)
      • LLVMRunStaticDestructors

        public static void LLVMRunStaticDestructors​(long EE)
      • nLLVMRunFunctionAsMain

        public static int nLLVMRunFunctionAsMain​(long EE,
                                                 long F,
                                                 int ArgC,
                                                 long ArgV,
                                                 long EnvP)
      • nLLVMRunFunction

        public static long nLLVMRunFunction​(long EE,
                                            long F,
                                            int NumArgs,
                                            long Args)
      • LLVMRunFunction

        public static long LLVMRunFunction​(long EE,
                                           long F,
                                           PointerBuffer Args)
      • LLVMFreeMachineCodeForFunction

        public static void LLVMFreeMachineCodeForFunction​(long EE,
                                                          long F)
      • LLVMAddModule

        public static void LLVMAddModule​(long EE,
                                         long M)
      • nLLVMRemoveModule

        public static int nLLVMRemoveModule​(long EE,
                                            long M,
                                            long OutMod,
                                            long OutError)
      • nLLVMFindFunction

        public static int nLLVMFindFunction​(long EE,
                                            long Name,
                                            long OutFn)
      • LLVMFindFunction

        public static boolean LLVMFindFunction​(long EE,
                                               java.nio.ByteBuffer Name,
                                               PointerBuffer OutFn)
      • LLVMFindFunction

        public static boolean LLVMFindFunction​(long EE,
                                               java.lang.CharSequence Name,
                                               PointerBuffer OutFn)
      • LLVMRecompileAndRelinkFunction

        public static long LLVMRecompileAndRelinkFunction​(long EE,
                                                          long Fn)
      • LLVMGetExecutionEngineTargetData

        public static long LLVMGetExecutionEngineTargetData​(long EE)
      • LLVMGetExecutionEngineTargetMachine

        public static long LLVMGetExecutionEngineTargetMachine​(long EE)
      • LLVMAddGlobalMapping

        public static void LLVMAddGlobalMapping​(long EE,
                                                long Global,
                                                long Addr)
      • LLVMGetPointerToGlobal

        public static long LLVMGetPointerToGlobal​(long EE,
                                                  long Global)
      • nLLVMGetGlobalValueAddress

        public static long nLLVMGetGlobalValueAddress​(long EE,
                                                      long Name)
      • LLVMGetGlobalValueAddress

        public static long LLVMGetGlobalValueAddress​(long EE,
                                                     java.nio.ByteBuffer Name)
      • LLVMGetGlobalValueAddress

        public static long LLVMGetGlobalValueAddress​(long EE,
                                                     java.lang.CharSequence Name)
      • nLLVMGetFunctionAddress

        public static long nLLVMGetFunctionAddress​(long EE,
                                                   long Name)
      • LLVMGetFunctionAddress

        public static long LLVMGetFunctionAddress​(long EE,
                                                  java.nio.ByteBuffer Name)
      • LLVMGetFunctionAddress

        public static long LLVMGetFunctionAddress​(long EE,
                                                  java.lang.CharSequence Name)
      • nLLVMCreateSimpleMCJITMemoryManager

        public static long nLLVMCreateSimpleMCJITMemoryManager​(long Opaque,
                                                               long AllocateCodeSection,
                                                               long AllocateDataSection,
                                                               long FinalizeMemory,
                                                               long Destroy)
      • LLVMCreateSimpleMCJITMemoryManager

        public static long LLVMCreateSimpleMCJITMemoryManager​(long Opaque,
                                                              LLVMMemoryManagerAllocateCodeSectionCallbackI AllocateCodeSection,
                                                              LLVMMemoryManagerAllocateDataSectionCallbackI AllocateDataSection,
                                                              LLVMMemoryManagerFinalizeMemoryCallbackI FinalizeMemory,
                                                              LLVMMemoryManagerDestroyCallbackI Destroy)
        Create a simple custom MCJIT memory manager. This memory manager can intercept allocations in a module-oblivious way. This will return NULL if any of the passed functions are NULL.
        Parameters:
        Opaque - an opaque client object to pass back to the callbacks
        AllocateCodeSection - allocate a block of memory for executable code
        AllocateDataSection - allocate a block of memory for data
        FinalizeMemory - set page permissions and flush cache. Return 0 on success, 1 on error.
      • LLVMDisposeMCJITMemoryManager

        public static void LLVMDisposeMCJITMemoryManager​(long MM)
      • LLVMCreateGDBRegistrationListener

        public static long LLVMCreateGDBRegistrationListener()
      • LLVMCreateIntelJITEventListener

        public static long LLVMCreateIntelJITEventListener()
      • LLVMCreateOProfileJITEventListener

        public static long LLVMCreateOProfileJITEventListener()
      • LLVMCreatePerfJITEventListener

        public static long LLVMCreatePerfJITEventListener()