similar to: cmake configuration changes to build Kaleidoscope outside of llvm examples src tree

Displaying 20 results from an estimated 4000 matches similar to: "cmake configuration changes to build Kaleidoscope outside of llvm examples src tree"

2016 Mar 31
1
Kaleidoscope examples on Windows
Are the Kaleidoscope examples supposed to work on Windows? e.g. C:\llvm\examples\Kaleidoscope\Orc\initial\toy.cpp when I try to compile this with clang it gives compile time error messages, and when I try with Microsoft C++ it generates an executable that runs but crashes when I type in an expression; I get similar results with a few of the other versions. I can give more detailed feedback if
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
On Nov 15, 2010, at 8:42 AM, Rob Pieke wrote: > SUCCESS! > > Sorry, I had removed the addFnAttr() call by accident. Using the basicAA pass and ReadOnly, as you suggested, works like a charm! > > :) Thanks. I've updated the documentation and examples in r119169. I didn't update the OCaml documentation or examples yet. It looks like the OCaml bindings don't expose
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
2015 Feb 10
3
[LLVMdev] Some basic questions regarding MCJIT and Kaleidoscope sample
Hi, I am building a new JIT compiler for Lua (actually a derivative of Lua), and am planning to use LLVM for this. I have trying out some basic functions using LLVM 3.5.1. I have been puzzled by one aspect of the MCJIT versions of the Kaleidoscope sample, and would hugely appreciate some insight. Can a single MCJIT instance be used to manage several modules? Why is a separate MCJIT instance
2010 Nov 15
1
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
SUCCESS! Sorry, I had removed the addFnAttr() call by accident. Using the basicAA pass and ReadOnly, as you suggested, works like a charm! :) > -----Original Message----- > From: Rob Pieke > Sent: Monday, November 15, 2010 4:40 PM > To: 'Duncan Sands' > Cc: 'llvmdev at cs.uiuc.edu'; 'Dan Gohman' > Subject: RE: [LLVMdev] Optimization of calls to
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
2010 Nov 15
1
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
Still no luck after switching to: theFPM->add( new llvm::TargetData( *theExecutionEngine->getTargetData() ) ); theFPM->add( llvm::createBasicAliasAnalysisPass() ); theFPM->add( llvm::createInstructionCombiningPass() ); theFPM->add( llvm::createReassociatePass() ); theFPM->add( llvm::createGVNPass() ); theFPM->add( llvm::createCFGSimplificationPass() ); Based on output
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
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
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,
2019 Jan 24
2
LLVM Kaleidoscope : Compiling to Object Code - Segmentation Fault
Hi all :) I'm new to llvm! I'm going through the kaleidoscope : compiling llvm IR to object code tutorial, code in the listings breaks and causes a segmentation fault. After some investigation through gdb, probably this constructor call, causing the segfault. |Program received signal SIGSEGV, Segmentation fault.|| ||0x00000000004afee0 in
2010 Jan 30
2
[LLVMdev] Compiling Kaleidoscope on Windows
I'm trying to get the Kaleidoscope tutorial mini compiler working on Windows (as a trial run for developing a compiler using LLVM). Kaleidoscope uses the C++ linkage method of code generation (as opposed to spitting out intermediate code in a text or binary file), which as I understand it is the preferred way of doing it for a few reasons, one of them being that it gives you JIT capability,
2013 Jun 04
1
[LLVMdev] MCJIT and Kaleidoscope Tutorial
Hi Dmitri, You're right. The lli code should be cleaned up. As David said, there was a time when the call to invalidate the instruction cache was necessary. It isn't necessary anymore. -Andy -----Original Message----- From: Dmitri Rubinstein [mailto:dmitri.rubinstein at googlemail.com] Sent: Tuesday, June 04, 2013 7:20 AM To: David Tweed Cc: Kaylor, Andrew; LLVM Dev Subject: Re:
2019 Jan 07
2
Kaleidoscope tutorial: extern functions failing
Hi all, I am new to LLVM and have been working through the Kaleidoscope tutorial. Everything is working fine so far except for local externs (as opposed to things like the math functions, which are working). Note that I have seen this bug with the reference code listing, as well as my own code. link to code: https://llvm.org/docs/tutorial/LangImpl05.html#full-code-listing [c34n10 kaleidoscope]
2013 Jun 04
0
[LLVMdev] MCJIT and Kaleidoscope Tutorial
Am 04.06.2013 16:05, schrieb David Tweed: > | I am curious about JMM->invalidInstructionCache(), which I found in > | lli.cpp implementation. lli.cpp contains also call finalizeObject(), I > | just overlooked it. lli.cpp calls finalizeObject(), which calls > | applyPermissions, which in turn calls invalidateInstructionCache. So why > | lli.cpp does call
2008 Sep 26
1
[LLVMdev] Kaleidoscope doesn't work properly
Haohui Mai <haohui.mai at gmail.com> writes: > 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. > >> Thanks, -rdynamic helps! It's a pity that it's not written in the >> tutorial. >> >> Also
2013 Nov 23
1
[LLVMdev] "Broken" link in Kaleidoscope sample
Perhaps somebody out there knows where this link should point: http://llvm.org/docs/ProgrammersManual.html#TypeResolve It simply goes to the top of the document, probably because something has been deleted or the document has been converted to reST. It is found on the last page of the Kaleidoscope tutorial: http://llvm.org/docs/tutorial/LangImpl8.html. -- Mikael -------------- next part
2010 Nov 15
6
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
I'm using the gvn pass, not sure about basic-aa. I've copied the code as-is from http://llvm.org/docs/tutorial/LangImpl4.html#code and added "F->addFnAttr( Attribute::ReadOnly )" after "Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule)". The passes it sets up are: // Set up the optimizer pipeline. Start with registering info about
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.
2009 Oct 03
1
[LLVMdev] LLVM-Kaleidoscope tutorial
Good morning everyone, It seems the LLVM tutorial is not up to date anymore and doesn't compile as is... The function makeLLVMModule() function doesn't compile at all. Here is a fix: Module *makeLLVMModule() { // Caches the global context to share it with new Module() and IntegerType::get() calls LLVMContext &context = getGlobalContext(); // Module Construction