similar to: [LLVMdev] lli external functions

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] lli external functions"

2009 Nov 18
0
[LLVMdev] lli -force-interpreter complains about external function
Hi Nick: The first problem have been solved by calling llvm-ld: $ llvm-ld -o hellosin.llvm hellosin.bc -lm $ lli -force-interpreter=true -load=/usr/lib/libm.so hellosin.llvm.bc hello sin: 0.50 The pthread problem remains after llvm-ld: $ lli -force-interpreter=true -load=/lib/libpthread.so.0 phello.llvm.bc 0 lli 0x08796bf8 Segmentation fault For those who are getting "invalid
2009 Nov 18
2
[LLVMdev] lli -force-interpreter complains about external function
Hi Nick: Thanks for pointing me to libffi. Recompile LLVM with libffi does solve the problem of printf. But it still has other problems: 1) sinf() returns 0 in the interpreter, but returns correct value in JIT (see hellosin.c) 2) calling pthread_create cause lli to crash in the interpreter mode, but no problem in JIT (see phello.c). My questions are: i) can I call any arbitrary external function
2009 Nov 18
0
[LLVMdev] lli -force-interpreter complains about external function
Hi Nick: Thanks for the response. You are right about sinf. I changed the constant to sscanf(argv[1], ...), and it gave me back 0 again. I also compared the disassembled code, and saw it was indeed the case. The primary reason I use interpreter is because I wish to do runtime checking on memory access pattern in multithreaded C programs. for example, if thread one is in the critical section, I
2009 Nov 18
3
[LLVMdev] lli -force-interpreter complains about external function
Xu Yang wrote: > Hi Nick: > > The first problem have been solved by calling llvm-ld: > > $ llvm-ld -o hellosin.llvm hellosin.bc -lm > $ lli -force-interpreter=true -load=/usr/lib/libm.so hellosin.llvm.bc > hello sin: 0.50 Only because the optimizer saw sin(constant) and folded it away. The entire program became 'print constant string'. There is certainly a bug
2010 Feb 26
1
[LLVMdev] lli --force-interpreter does not find external function
Hello everyone, I'm trying to run a LLVM-Bytecode-file in the interpreter (lli --force-interpreter), but i'm getting the following error-message: LLVM ERROR: Tried to execute an unknown external function: i8* (i32)* malloc My program is calling malloc. If I omit --force-interpreter everything runs as expected. Compiling to Assembler also works without problems. I have compiled LLVM with
2009 Nov 17
0
[LLVMdev] lli -force-interpreter complains about external function
Timo Juhani Lindfors wrote: > Nick Lewycky<nicholas at mxc.ca> writes: >> The interpreter uses libffi to make external function calls. However, it >> needs to be detected at LLVM's compile time. If you're using the >> released packages, we disabled that because we were worried about users >> who don't have libffi installed. > > This seems to be
2009 Nov 16
3
[LLVMdev] lli -force-interpreter complains about external function
Nick Lewycky <nicholas at mxc.ca> writes: > The interpreter uses libffi to make external function calls. However, it > needs to be detected at LLVM's compile time. If you're using the > released packages, we disabled that because we were worried about users > who don't have libffi installed. This seems to be quite a common problem (I too hit it once, thought it
2010 Oct 24
2
[LLVMdev] lli : external functions and target datalayout
Hi All, I have a C code: ////////////////////////////// #include "stdio.h" int main () { putchar('a'); return 0; } llvm-gcc -emit-llvm, I got //////////////////////////////////////// ; ModuleID = 't1.bc' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" target triple
2012 May 23
0
[LLVMdev] How to get llvm bitcode executed
Hi Xiaolong, > As Duncan described, "lli -load=libstdc++.dylib ..." works. I, > however, encounted an "Illegal instruction" message, while I was > trying to interpret a large program. are you using the interpreter or the JIT? So, does lli have a debug switch > for dumping out the details for errors? > > Using llc is not that simple, and I have not gotten
2009 Oct 19
3
[LLVMdev] Objective-C code in lli
Hi, Is it possible to run Objective-C code in lli? lli does not seem to want to load Foundation.framework. Please see below. Thanks, Eric Brunstad #import <Foundation/Foundation.h> int main(int argc, char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLog(@"test!"); [pool drain]; return EXIT_SUCCESS; } cmu-351714:llvm-2.5 ericbrunstad$
2009 Oct 19
0
[LLVMdev] Objective-C code in lli
On Oct 18, 2009, at 6:32 PM, Eric Brunstad wrote: > Hi, > > Is it possible to run Objective-C code in lli? lli does not seem to > want to load Foundation.framework. It is definitely possible, but we're not there yet. LLI would have to know about objective-c metadata to register it properly with the runtime. This is important for things like classes etc. This isn't
2009 Nov 16
2
[LLVMdev] lli -force-interpreter complains about external function
Hi: When I try to execute lli -force-interpreter=true hello.bc, it gave the following error: LLVM ERROR: Tried to execute an unknown external function: i32 (i8*)* puts I think the error is because C library is not being linked with the byte code, but I was not able to find any helpful instruction in lli's document. Can you please teach me how to do it? Thanks Xu The hello.bc is
2009 Oct 19
1
[LLVMdev] Objective-C code in lli
Hi, What would be an estimate for the amount of work required to implement this? Where would I get started if I were to implement it? My goal is to run Objective-C programs in the interpreter so I can provide an application-sandbox by disallowing the invocation of certain C-functions and also by disallowing the invocation of certain Objective-C methods. Thanks, Eric On Oct 19, 2009,
2009 Nov 16
0
[LLVMdev] lli -force-interpreter complains about external function
Xu Yang wrote: > Hi: > > When I try to execute lli -force-interpreter=true hello.bc, it gave the > following error: > > LLVM ERROR: Tried to execute an unknown external function: i32 (i8*)* puts > > I think the error is because C library is not being linked with the byte > code, but I was not able to find any helpful instruction in lli's document. > > Can you
2012 May 22
2
[LLVMdev] How to get llvm bitcode executed
Thanks Duncan and Ashok, As Duncan described, "lli -load=libstdc++.dylib ..." works. I, however, encounted an "Illegal instruction" message, while I was trying to interpret a large program. So, does lli have a debug switch for dumping out the details for errors? Using llc is not that simple, and I have not gotten through the compilation process. For instance, "llc -o
2006 Oct 26
2
[LLVMdev] lli in interpreter mode and external native libraries
Hi all, Is there any way to support calling external libraries from interpreted code (*not* JITted code) within lli? I am looking at the external functions implementation, and it seems just to wrap back onto its own library, looking up lli_X_... prefixed functions. It would (for obvious reasons) be incredibly useful not to be restricted to the (tiny) set of supplied functions. Thank you in
2008 Oct 30
3
[LLVMdev] Problem executing code with lli...
Hi all, I am facing new problem with lli now. I am having a sample code in which I am doing malloc for two variables. If I compile the code with normal gcc the program runs without any warning of any sorts. If I compile the program to convert it into a bytecode file and then run it through lli it segfaults and the program aborts. This is the stack trace after execution. lli((anonymous
2005 Feb 25
0
[LLVMdev]Linker error building (modified) lli
Linking lli debug executable (without symbols) /mounts/zion/disks/0/localhome/pmeredit/llvm/lib/Debug/lli-interpreter.o(.te xt+0x643a): In function `llvm::Interpreter::callExternalFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&)': /localhome/pmeredit/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.c pp:98: undefined
2009 Dec 31
0
[LLVMdev] How does JIT/lli work with bc file?
On Wed, Dec 30, 2009 at 7:53 PM, Heming Cui <heming at cs.columbia.edu> wrote: > Dear all, >      I hope you enjoy your christmas! Recently I started to play lli with > bc. I found that the lli only calls the main() function in bc file and then > does nothing before the main() function returns, which means that the > JIT::runFunction() function is involved only once with the
2011 Aug 24
0
[LLVMdev] lli interpreter fails to execute external functions
Hi all I compiled LLVM using ./configure --enable-assertions --enable-debug-runtime --enable-debug-symbols --enable-docs --enable-shared --enable-libffi --disable-optimized And then try to execute a .bc file using lli, ${LLVM_HOME}/Debug+Asserts/bin/lli -debug -force-interpreter ./jpegant.bc It reports : About to interpret: %9 = call i8* @memset(i8* %8, i32 0, i32 122)LLVM ERROR: Tried