search for: vasyliev

Displaying 14 results from an estimated 14 matches for "vasyliev".

2009 May 08
5
[LLVMdev] Automake and llvm-config
Hello, I'm using autotools to build my little lang. So I want to have something like this in my Makefile.am: mylang_SOURCES = mylang.cpp mylang_LDADD = mylib.a `llvm-config --cppflags --ldflags --libs core jit native ipo` But automake complains: tools/Makefile.am:8: linker flags such as `--cppflags' belong in `mylang_LDFLAGS I tried different workarounds but nothing helps :( The only
2008 Sep 30
1
[LLVMdev] Can't add Merge Duplicate Global Constants pass
Hi I have a program similar to kaleidoscope with same optimization passes. It works fine. But when I tried to add Constant Merge Pass with a line: OurFPM.add(createConstantMergePass()); the program died with segmentation fault. Then I tried to add the same line to native kaleidoscope from http://llvm.org/docs/tutorial/LangImpl4.html and I've got the same segmentation fault. The backtrace
2009 May 08
0
[LLVMdev] Automake and llvm-config
Hi >>>>> "AV" == Andrii Vasyliev <andrii.vasyliev at gmail.com> writes: AV> Hello, I'm using autotools to build my little lang. So I want to AV> have something like this in my Makefile.am: AV> mylang_SOURCES = mylang.cpp mylang_LDADD = mylib.a `llvm-config AV> --cppflags --ldflags --libs core jit native ip...
2009 Sep 06
3
[LLVMdev] Equivalent types
Hi! I have this error while building my code: Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!") Actually I'm trying to load functions from .bc file and use them in the code that I'm building with IRBuilder. I found that function parameter type is %struct.reValue* and
2008 Sep 25
3
[LLVMdev] Kaleidoscope doesn't work properly
Hi I hope this is a proper place to put my question. I've compiled Kaleidoscope from "Adding JIT and Optimizer Support" tutorial. Basically it works just fine but when I try to run extern'ed putchard function it aborts. Please, tell me what am I doing wrong? Here is more information: My PC runs FreeBSD. I've copied the toy source code exactly and didn't change it.
2008 Sep 24
1
[LLVMdev] LLVM and C++
Hi I want to use LLVM to generate a code working with C++ objects. I've got basics of LLVM IR generation from Kaleidoscope and other tutorials. Then I tried to llvm-dis'assemble llvm-gcc'ompiled C++ program and I see how to generate all this strangely named functions and how to run constructors and destructors. So I can imagine how to generate C++ compatible code with LLVM. But it
2008 Sep 25
0
[LLVMdev] Kaleidoscope doesn't work properly
Link with -rdynamic or provide a mapping. /Stein Roger Andrii Vasyliev wrote: > Hi > > I hope this is a proper place to put my question. > > I've compiled Kaleidoscope from "Adding JIT and Optimizer Support" tutorial. > Basically it works just fine but when I try to run extern'ed putchard > function it aborts. > Please, tell...
2008 Sep 25
3
[LLVMdev] Kaleidoscope doesn't work properly
Thanks, -rdynamic helps! It's a pity that it's not written in the tutorial. Also I'm interested how can I provide a mapping? 2008/9/25 srs <skaflotten at gmail.com>: > Link with -rdynamic or provide a mapping.
2008 Sep 26
0
[LLVMdev] Kaleidoscope doesn't work properly
I've already filed a bug report but nobody cares :-( Is it possible to fix the documentation? Because I think the tutorial is really important to beginners, which should not be misleading. -- Haohui On Sep 25, 2008, at 9:42 AM, Andrii Vasyliev wrote: > Thanks, -rdynamic helps! It's a pity that it's not written in the > tutorial. > > Also I'm interested how can I provide a mapping? > > 2008/9/25 srs <skaflotten at gmail.com>: >> Link with -rdynamic or provide a mapping. > ___________________...
2008 Oct 08
1
[LLVMdev] How can I create CallInst with a pointer to function
Hi I mean when I have in my program pointer to a function how should I build IR to call the function by the pointer? Or how can I create llvm::Function with a pointer to a function? I want to have something like this: int factorial (int n) { return n==0 ? 1 : n*factorial(n-1); } typedef int (*intFunc) (int); intFunc fptr = factorial; Value * N = ConstantInt::get(Type::Int32Ty,10);
2009 May 08
0
[LLVMdev] Automake and llvm-config
Can you use an intermediate variable? TMP = `...` mylang_LDADD = ... $TMP On 2009-05-08, at 04:40, Andrii Vasyliev wrote: > Hello, > > I'm using autotools to build my little lang. > So I want to have something like this in my Makefile.am: > > mylang_SOURCES = mylang.cpp > mylang_LDADD = mylib.a `llvm-config --cppflags --ldflags --libs core > jit native ipo` > > But automake co...
2009 Sep 06
0
[LLVMdev] Equivalent types
Hi Andrii-- They're not equivalent as far as LLVM is concerned - the parameter type is { { i32 }. { i64 } }* whereas the function is being given a { i32, i64 }*. Probably the easiest way to work around this is a simple bitcast. Alastair On 7 Sep 2009, at 00:32, Andrii Vasyliev wrote: > Hi! > > I have this error while building my code: > Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) > == Params[i]->getType()) && "Calling a function with a bad > signature!") > Actually I'm trying to load functio...
2009 Sep 05
2
[LLVMdev] Cross-module optimization
Hi! I want to load several modules with BitcodeReader and build a module with IRBuilder and then optimize them alltogether. Actually I want functions from loaded modules to be inlined in functions that I've built. Is it possible with LLVM? As I understood PassManager runs upon only one module at once. May be is there some workaround? Like joining all the modules in one and then optimize it.
2009 Sep 05
1
[LLVMdev] Cross-module optimization
>> May be is there some workaround? Like joining all the modules in one >> and then optimize it. Unfortunately I couldn't find a way to join modules. > llvm-link does this. Thanks for answer, Duncan! But I want to do it in my program and then run it with ExecutionEngine... Hey, but I took a look inside of llvm-link and found a Linker class which does modules linking! :) So,