similar to: [LLVMdev] LLVM and C++

Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] LLVM and C++"

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
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.
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 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.
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
2019 Mar 15
2
Static constructors with ORC JIT?
Thank you Alex, I went and implemented a solution along those lines. It works well. It may be worth mentioning static constructors in the Kaleidoscope tutorial. Cheers, Daniele ________________________________________ From: Alex Denisov [1101.debian at gmail.com] Sent: 15 March 2019 08:07 To: Daniele Vettorel Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] Static constructors with ORC
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);
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 me what am I doing wrong?
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
2014 Dec 26
2
[LLVMdev] Function calls only being JIT'd once by Kaleidoscope with MCJIT?
Hi all, Starting from Chapter 4 of the Kaleidoscope tutorial (where the JIT support is added), there's some strange behaviour, ready> def foo(x y) x+y; ready> Read function definition: define double @foo(double %x, double %y) { entry: %addtmp = fadd double %x, %y ret double %addtmp } ready> foo(1, 2); ready> Evaluated to 3.000000 ready> foo(3, 4); ready> Evaluated to
2016 Aug 29
2
cmake configuration changes to build Kaleidoscope outside of llvm examples src tree
I try to understand cmake build configuration. As an example, I copied Kaleidoscope from llvm examples to some other directory (e.g., /tmp/Kaleidoscope). What change(s) that I need to make to "CMakkeLists.txt" in order to build Kaleidoscope from /tmp/Kaleidoscope? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 Jun 04
0
[LLVMdev] MCJIT and Kaleidoscope Tutorial
Hi Dmitri, You might want to try replacing the call to JMM->invalidInstructionCache() with a call to TheExecutionEngine->finalizeObject(). If you are getting a non-NULL pointer from getPointerToFunction but it crashes when you try to call it, that is most likely because the memory for the generated code has not been marked as executable. That happens inside finalizeObject, which also
2015 Jan 16
2
[LLVMdev] Function calls only being JIT'd once by Kaleidoscope with MCJIT?
Oh - I know what this is. You were running this on Linux, right? On MacOS I think the symbol is getting double mangled while going through MCJIT::getSymbolAddress, hence the failure: The IR level foo function gets compiled to "_foo" in the object file, and then "_foo" gets mangled to "__foo" when we look it up. Linux doesn't do assembly level name-mangling, so
2009 Oct 04
4
[LLVMdev] LLVMdev Digest, Vol 64, Issue 5
Where exactly is this mythical Kaleidoscope example? I have llvm 2.5 installed. examples dsw$ ls BrainF Fibonacci Makefile ParallelJIT CMakeLists.txt HowToUseJIT ModuleMaker > Date: Sat, 3 Oct 2009 21:40:44 +0100 > From: Renato Golin <rengolin at systemcall.org> > Subject: Re: [LLVMdev] LLVM-Kaleidoscope tutorial > > 2009/10/3 Remy Demarest <remy.demarest at
2015 Jan 16
3
[LLVMdev] Function calls only being JIT'd once by Kaleidoscope with MCJIT?
Cheers Lang! You were right, I was testing this on Linux. I was planning on committing these changes with the corresponding changes to the Kaleidoscope tutorial walk-through. Might be a bit of a surprise to have no explanation of what MCJITHelper and friends is doing. I'll try and make time to prepare some patches along these lines, as well as updating future chapters with the same fix.
2013 Jun 03
5
[LLVMdev] MCJIT and Kaleidoscope Tutorial
Hi all, I tried to modify Kaleidoscope Tutorial (toy.cpp from llvm/examples/Kaleidoscope/Chapter7, LLVM 3.3 release branch) in order to use MCJIT instead of JIT. I get segmentation fault when running toy.cpp with fibonacci example from the tutorial. My modified toy.cpp is in attachment and still works with JIT (when #define USE_MCJIT line is commented out). I read discussions regarding
2015 Aug 20
2
Linking existing functions from JITed code
Lang, I added the add/get global mapping to my kaleidoscope JIT, but I think perhaps these would make more sense if they were added to the object linking layer as they would be generally usable there. On Aug 19, 2015, at 11:19 PM, Andy Somogyi wrote: > Hey Lang, > > I've added this to my Kaleidoscope JIT, and it seems to work just fine, basically I copied the global mapping
2016 Apr 01
2
Kaleidoscope on Windows - bug maybe found?
To try to find out why it was crashing, I followed the trail of function calls: C:\llvm\examples\Kaleidoscope\Orc\initial\toy.cpp auto ExprSymbol = J.findUnmangledSymbol("__anon_expr"); JITSymbol findUnmangledSymbol(const std::string Name) { return findSymbol(mangle(Name)); } JITSymbol findSymbol(const std::string &Name) { return CompileLayer.findSymbol(Name,
2012 Mar 23
0
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Mar 23, 2012, at 3:25 PM, Bill Wendling wrote: > Let's take your example. You will have code that looks like this: > > extern "C" void thunk_item_M_delete( void *v_that ) { > item *that = 0; > try { > that = static_cast<item*>( v_that ); > that->~item(); > } catch (...) { > that->~item(); > } > } No I
2014 Jul 25
2
[LLVMdev] Reminder: Please switch to MCJIT, as the old JIT will be removed soon.
Hi Everyone, If you're JITing with LLVM and haven't made the switch to MCJIT already, now is the time. As per discussions on the mailing list and at the last dev meeting, LLVM 3.5 will be the last release to support the old JIT infrastructure. Now that LLVM 3.5 has branched, we plan to start removing the old JIT from the mainline. If you're looking for help in making the switch, Andy