Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] stdlib & math?"
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 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
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
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 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
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 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
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:
2009 Dec 31
2
[LLVMdev] How does JIT/lli work with bc file?
Hi Eli,
Thanks for your reply. If I add -force-interpreter to lli, then it seems
that it can not run external function like printf or malloc. Is there any
easy way to solve this problem?
On Wed, Dec 30, 2009 at 11:26 PM, Eli Friedman <eli.friedman at gmail.com>wrote:
> On Wed, Dec 30, 2009 at 7:53 PM, Heming Cui <heming at cs.columbia.edu>
> wrote:
> > Dear all,
>
2012 Mar 02
5
[LLVMdev] (Newbie) Using lli with clang++?
Hello all,
I'm brand new to using LLVM and am having trouble using lli with a C++
program. I tried to compile the following:
#include<iostream>
using namespace std;
int main()
{
cout << "Hello, world!" << endl;
return 0;
}
When I compile directly to an executable with the following command, all is
well:
$ clang++ -O3 hello.cpp -o hello
But when I try to produce
2015 Jul 28
2
[LLVMdev] Regression testing on MSYS2 host with mingw-w64
>
> Is it turned ON in your build?
>
Yes it is turned on in my build
here is my build script
PATH=/mingw64/bin:$PATH
FFI_INCLUDE_DIR="$(pkg-config --cflags libffi)"
> FFI_INCLUDE_DIR=$(echo $FFI_INCLUDE_DIR | sed 's|-I||g')
>
> /mingw64/bin/cmake.exe \
> -G"MSYS Makefiles" \
> -DCMAKE_MAKE_PROGRAM="/usr/bin/make.exe" \
>
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
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 Dec 31
0
[LLVMdev] How does JIT/lli work with bc file?
On Thu, Dec 31, 2009 at 2:26 AM, Heming Cui <heming at cs.columbia.edu> wrote:
> Hi Eli,
> Thanks for your reply. If I add -force-interpreter to lli, then it seems
> that it can not run external function like printf or malloc. Is there any
> easy way to solve this problem?
Does the LLVM configure find libffi?
-Eli
2015 Jul 28
2
[LLVMdev] Regression testing on MSYS2 host with mingw-w64
Hi Yaron,
I know you sent me some emails before about regression testing on MSYS2
So you might have some idea about this
I am getting a regression error on check-llvm.
With the llvm/trunk/test/ExecutionEngine/Interpreter/intrinsics.ll
FAIL: LLVM :: ExecutionEngine/Interpreter/intrinsics.ll (7635 of 14266)
> ******************** TEST 'LLVM ::
>
2009 Dec 07
3
[LLVMdev] Compilation problem with JIT/Interpreter
Hi,
I'm yet working on the LLVM ExecutionEngine portability (2.6 release
version) and I get two different problems depending on the platform. The
first problem concerns compilation on MacOs X (10.5.5) with an X86
processor, when trying to compile my own project containing the
ExecutionEngine class and the linker class. I get links problem
with "_ffi_type_sint16",
2015 Jul 28
0
[LLVMdev] Regression testing on MSYS2 host with mingw-w64
This test results in UNSUPPORTED on my system, since config.enable_ffi =
"OFF". This is the result of LLVM_ENABLE_FFI which is OFF by default. Is it
turned ON in your build?
2015-07-28 17:32 GMT+03:00 Martell Malone <martellmalone at gmail.com>:
> Hi Yaron,
>
> I know you sent me some emails before about regression testing on MSYS2
> So you might have some idea about
2012 May 14
2
[LLVMdev] MCJIT
On May 14, 2012, at 11:12 AM, Ashok Nalkund <ashoknn at qualcomm.com> wrote:
> On 5/14/2012 10:40 AM, Ashok Nalkund wrote:
>>>
>>> Hm. OK, that's odd. It should change which constructor gets called in EngineBuilder::create() (which is in lib/ExecutionEngine/ExecutionEngine.cpp). Are you perhaps calling setUseMCJIT(true) after having already called create()? Can
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 Aug 09
0
[LLVMdev] Signals: interpreter vs. JIT
Hello Matt,
The interpreter doesn't support external functions at all. This includes the printf function from the glibc library. That's why the signal causes a segfault.
If you're interested in bringing the interpreter up-to-date with the JIT compiler, I would welcome it since JIT compilation isn't supported on all platforms.
--Sam
----- Original Message ----
> From: