search for: llvmverifymodule

Displaying 11 results from an estimated 11 matches for "llvmverifymodule".

2017 Mar 09
2
LLVMGetBitcodeModuleInContext2 problem
...amp;module, &error); > > global_context = LLVMGetGlobalContext(); > > flag = LLVMGetBitcodeModuleInContext2(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"); >...
2009 Nov 19
1
[LLVMdev] llvm-c: LLVMCreateExecutionEngine returning empty error message
Hello, I'm using the llvm-c bindings for C, but I'm getting some problems, the LLVMCreateExecutionEngine is returning 1 but the error message is an empty string (it's !=NULL). The steps I'm doing is to create the module, then I call LLVMVerifyModule to verify and it works fine, later I call LLVMCreateModuleProviderForExistingModule and it returns !=NULL MP, so it's ok, but then when I call something like this: error_ret = LLVMCreateJITCompiler(&engine, provider, 0, &verror) It returns 1 in error_ret and an empty string in verror, d...
2015 Jun 08
3
[LLVMdev] Question about usage of LLVMLinkModules()
...d I would really welcome as much advice as you can give me on that but it works. The issue comes when I actually create 2 different modules. One being a "standard" library of sorts and the other the main module which should use it. I create both modules, with no errors appearing if I use LLVMVerifyModule() on them. The problem is how do I link them? I tried to do it like this: // if an error occurs LLVMLinkModules() returns true if (true == LLVMLinkModules(main_module, stdlib_module, LLVMLinkerDestroySource, &error)) { bllvm_error("Could not link L...
2015 Jun 11
2
[LLVMdev] Question about usage of LLVMLinkModules()
...as you can give me on > that but it works. > > > > The issue comes when I actually create 2 different modules. One being a > "standard" library of sorts and the other the main module which should use > it. I create both modules, with no errors appearing if I use > LLVMVerifyModule() on them. > > > > The problem is how do I link them? I tried to do it like this: > > > > // if an error occurs LLVMLinkModules() returns true > > if (true == LLVMLinkModules(main_module, stdlib_module, > LLVMLinkerDestroySource, &error))...
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: > > >>
2016 Dec 18
3
LLD status update and performance chart
...with fatal error handling. Is anybody aware of a program that uses LLVM as > a library, produces IR in memory, runs the verifier, and does not simply > abort if the verifier fails in non-development builds? > I'm doing the same as clang: #ifndef NDEBUG char *error = nullptr; LLVMVerifyModule(g->module, LLVMAbortProcessAction, &error); #endif However the LLVM API is defined such that trying to call codegen functions on an invalid module is undefined, and aborting in this case makes sense. This is really just a more sophisticated assert(). I'm a fan of assert(); I like havin...
2016 Dec 26
0
bug in the LiveDebugValues code?
...llvm 3.9.0. I found this while troubleshooting what I now to believe to be a separate issue in my frontend code that caused LLVM to go into an infinite loop writing into a .o file. When I ran that IR code against llc, I got "error: initializer with struct type has wrong # elements" which LLVMVerifyModule did not catch. I can provide this example IR as well if wanted. Regards, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161226/f1aab2e0/attachment.html>
2017 Jan 25
2
mcjit C interface problems
...LLVMAppendBasicBlock(sum, "entry"); LLVMBuilderRef builder = LLVMCreateBuilder(); LLVMPositionBuilderAtEnd(builder, entry); LLVMValueRef tmp = LLVMBuildAdd(builder, LLVMGetParam(sum, 0), LLVMGetParam(sum, 1), "tmp"); LLVMBuildRet(builder, tmp); char* error = NULL; LLVMVerifyModule(mod, LLVMAbortProcessAction, &error); LLVMDisposeMessage(error); LLVMExecutionEngineRef engine; error = NULL; LLVMLinkInMCJIT(); LLVMInitializeNativeTarget(); LLVMInitializeNativeAsmPrinter(); LLVMInitializeNativeAsmParser(); if (LLVMCreateExecutionEngineForModule(&engine,...
2009 Nov 05
2
[LLVMdev] Strange error for libLLVMCore.a
...c.c:48: undefined reference to `LLVMInt32Type' c:\Work\llvm//fac.c:48: undefined reference to `LLVMBuildPhi' c:\Work\llvm//fac.c:51: undefined reference to `LLVMAddIncoming' c:\Work\llvm//fac.c:52: undefined reference to `LLVMBuildRet' c:\Work\llvm//fac.c:54: undefined reference to `LLVMVerifyModule' c:\Work\llvm//fac.c:55: undefined reference to `LLVMDisposeMessage' c:\Work\llvm//fac.c:59: undefined reference to `LLVMCreateModuleProviderForExistingModule' c:\Work\llvm//fac.c:61: undefined reference to `LLVMCreateJITCompiler' c:\Work\llvm//fac.c:64: undefined reference to `LLV...
2007 Oct 10
1
[LLVMdev] make check fails on latest SVN version
...In function `llvm_verify_function': analysis_ocaml.c:(.text+0x2a): undefined reference to `LLVMVerifyFunction' /home/edwin/llvm-svn/llvm/Release/lib/ocaml/libllvm_analysis.a(analysis_ocaml.o): In function `llvm_assert_valid_module': analysis_ocaml.c:(.text+0x49): undefined reference to `LLVMVerifyModule' /home/edwin/llvm-svn/llvm/Release/lib/ocaml/libllvm_analysis.a(analysis_ocaml.o): In function `llvm_verify_module': analysis_ocaml.c:(.text+0xba): undefined reference to `LLVMVerifyModule' analysis_ocaml.c:(.text+0xd1): undefined reference to `LLVMDisposeVerifierMessage' collect2:...
2016 Dec 18
0
LLD status update and performance chart
On Fri, Dec 16, 2016 at 12:31 PM, Pete Cooper via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > On Dec 16, 2016, at 11:46 AM, Rui Ueyama <ruiu at google.com> wrote: > > On Fri, Dec 16, 2016 at 11:18 AM, Pete Cooper <peter_cooper at apple.com> > wrote: > >> Hi Rui >> >> I agree separating the components out in to libraries only makes sense