search for: llvmcreateexecutionengineformodule

Displaying 7 results from an estimated 7 matches for "llvmcreateexecutionengineformodule".

2011 Sep 19
1
[LLVMdev] Seg Fault when creating an execution engine
I am creating an ExecutionEngine using the LLVMCreateExecutionEngineForModule function from the C API. I am get a set fault with the following backtrace. Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000120 0x0000000107c06643 in llvm::LLVMTargetMachine::addCommonCodeGenPasses () (gdb) bt #0 0x000000010...
2017 Mar 09
2
LLVMGetBitcodeModuleInContext2 problem
...ext2(global_context, module, > &ir_lib_module); > > printf("LLVMGetBitcodeModuleInContext2() returned %d\n", flag); > > LLVMVerifyModule(ir_lib_module, LLVMAbortProcessAction, &error); > LLVMDumpModule(ir_lib_module); > > if (LLVMCreateExecutionEngineForModule(&engine, ir_lib_module, > &error) != 0) { > fprintf(stderr, "failed to create execution engine\n"); > abort(); > } > > // Call the function > func = (object0_t * (*)(void))LLVMGetFunctionAddress(engine, &...
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
Or do you mean I need to load the module into memory before calling LLVMGetBitcodeModuleInContext2? > Yes, you need to load the module into memory first. > LLVMCreateMemoryBufferWithContentsOfFile will do that for you. Thanks! On Wed, Mar 8, 2017 at 3:48 PM, Friedman, Eli <efriedma at codeaurora.org> wrote: > On 3/8/2017 3:44 PM, Toshiyasu Morita wrote: > > >>
2012 Apr 25
2
[LLVMdev] Crash in JIT
...y); (void) retInst; LLVMDisposeBuilder(builder); LLVMLinkInJIT(); LLVMLinkInInterpreter(); LLVMInitializeNativeTarget(); LLVMDumpModule(module); /* Now run it! */ LLVMExecutionEngineRef jit = NULL; char *err; // LLVMBool result = LLVMCreateExecutionEngineForModule(&jit, module, &err); LLVMBool result = LLVMCreateJITCompilerForModule(&jit, module, 0, &err); if (result) { printf("Fail: %s\n", err); return -1; } printf("JIT is %p\n", jit); LLVMGenericValueRef argM = LLVMCreateGenericVa...
2012 Apr 25
0
[LLVMdev] Crash in JIT
...BuildRet(builder, y); (void) retInst; LLVMDisposeBuilder(builder); LLVMLinkInJIT(); LLVMLinkInInterpreter(); LLVMInitializeNativeTarget(); LLVMDumpModule(module); /* Now run it! */ LLVMExecutionEngineRef jit = NULL; char *err; // LLVMBool result = LLVMCreateExecutionEngineForModule(&jit, module, &err); LLVMBool result = LLVMCreateJITCompilerForModule(&jit, module, 0, &err); if (result) { printf("Fail: %s\n", err); return -1; } printf("JIT is %p\n", jit); LLVMGenericValueRef argM = LLVMCreateGenericValue...
2017 Jan 25
2
mcjit C interface problems
...tmp); char* error = NULL; LLVMVerifyModule(mod, LLVMAbortProcessAction, &error); LLVMDisposeMessage(error); LLVMExecutionEngineRef engine; error = NULL; LLVMLinkInMCJIT(); LLVMInitializeNativeTarget(); LLVMInitializeNativeAsmPrinter(); LLVMInitializeNativeAsmParser(); if (LLVMCreateExecutionEngineForModule(&engine, mod, &error) != 0) { fprintf(stderr, "failed to create execution engine\n"); abort(); } if (error) { fprintf(stderr, "error: %s\n", error); LLVMDisposeMessage(error); exit(EXIT_FAILURE); } if (argc < 3) { fprintf(stderr, &quot...
2016 Aug 10
2
crash JIT with AVX intrinsics
...ection-3.7 7ffcb60c9960, size 20, align 20 segmentation fault $ avx-instruction-selection-3.8 7ffef88c3500, size 20, align 20 segmentation fault That is, it works only for LLVM-3.4 and LLVM-3.5. However I can make the two versions crash, too, by adding setUseMCJIT(true) to the engineBuilder in LLVMCreateExecutionEngineForModuleCPU. Do you have any idea what might went wrong? How could I investigate the crash? Are there equally simple examples that show how to use the current LLVM API correctly? Btw. my problem is a follow-up of this StackOverflow question: http://stackoverflow.com/questions/38738123/determining-and-...