Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] lli in interpreter mode and external native libraries"
2006 Oct 26
0
[LLVMdev] lli in interpreter mode and external native libraries
On Wed, 25 Oct 2006, Sarah Thompson wrote:
> Is there any way to support calling external libraries from interpreted
> code (*not* JITted code) within lli?
Sure.
> 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
>
2006 Oct 26
2
[LLVMdev] lli in interpreter mode and external native libraries
Chris Lattner wrote:
> 3. Best: Find a "foreign function interface" library, and use that to
> interface to native code.
>
This is the only option that's really usable, unfortunately, because I
have no control over what code some potential user might want to model
check.
I was wondering whether there might be anything in the JIT support that
could be reused for
2006 Oct 26
2
[LLVMdev] lli in interpreter mode and external native libraries
Chris Lattner wrote:
>
> The JIT has a superset of this functionality. However, if there is JIT
> support for the host that you are interested in, you shouldn't have to use
> the interpreter at all.
>
>
For interpreting, yes, but model checking is weirder so it's greatly
beneficial to be able to heavily hack an interpreter.
>> I can't really move to using
2006 Oct 26
0
[LLVMdev] lli in interpreter mode and external native libraries
On Thu, 26 Oct 2006, Sarah Thompson wrote:
> Chris Lattner wrote:
>> 3. Best: Find a "foreign function interface" library, and use that to
>> interface to native code.
>>
> This is the only option that's really usable, unfortunately, because I
> have no control over what code some potential user might want to model
> check.
Ok.
> I was wondering
2006 Oct 28
0
[LLVMdev] lli in interpreter mode and external native libraries
>>> I can't really move to using the JIT entirely because I want to replace
>>> the memory model with something that supports backtracking -- this is
>>> doable (fairly) straightforwardly with the interpreter, but it would
>>> require some very complicated transformations to the code in order to do
>>> this within the JIT environment, and it would
2011 Jun 15
2
[LLVMdev] LLVM interpreter does not support fmod
It seems llvm interpreter only supports a limited number of external
functions. fmod, in particular is not supported. any reason why it is not
supported ?
"lli -force-interpreter test.bc
LLVM ERROR: Tried to execute an unknown external function: double (double,
double)* fmod
"
--
Kind Regards
Xin Tong
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
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
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
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
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
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
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
2009 Nov 18
1
[LLVMdev] lli -force-interpreter complains about external function
Nick Lewycky <nicholas at mxc.ca> writes:
> Thanks for the reminder. I recall looking at the patch but I didn't
> apply it at the time because I couldn't figure out why the code above
> it used errs() in one case and llvm_report_error in another.
What was the reason? (I think I too wondered that.)
2011 Jun 15
0
[LLVMdev] LLVM interpreter does not support fmod
Hi,
> It seems llvm interpreter only supports a limited number of external
> functions. fmod, in particular is not supported. any reason why it is not
> supported ?
>
> "lli -force-interpreter test.bc
> LLVM ERROR: Tried to execute an unknown external function: double (double,
> double)* fmod
> "
You can check out the comments in
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 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
2011 Jun 15
1
[LLVMdev] LLVM interpreter does not support fmod
On Jun 14, 2011, at 7:57 PM, 陳韋任 wrote:
> Hi,
>
>> It seems llvm interpreter only supports a limited number of external
>> functions. fmod, in particular is not supported. any reason why it is not
>> supported ?
>>
>> "lli -force-interpreter test.bc
>> LLVM ERROR: Tried to execute an unknown external function: double (double,
>> double)* fmod
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