search for: kaleidoscope

Displaying 20 results from an estimated 498 matches for "kaleidoscope".

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: <http://lists...
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.0000...
2010 Jul 21
1
[LLVMdev] Is there a guide to LLVM's components?
...; Fibonacci, "examples\Fibonacci\Fibonacci.vcproj" FileCheck, "utils\FileCheck\FileCheck.vcproj" HowToUseJIT, "examples\HowToUseJIT\HowToUseJIT.vcproj" INSTALL, ".\INSTALL.vcproj" Kaleidoscope-Ch2, "examples\Kaleidoscope\Chapter2\Kaleidoscope-Ch2.vcproj" Kaleidoscope-Ch3, "examples\Kaleidoscope\Chapter3\Kaleidoscope-Ch3.vcproj" Kaleidoscope-Ch4, "examples\Kaleidoscope\Chapter4\Kaleidoscope-Ch4.vcproj" Kaleidosc...
2013 Jun 04
0
[LLVMdev] MCJIT and Kaleidoscope Tutorial
...arked as executable. That happens inside finalizeObject, which also invalidates the code cache. Even so, this will likely only work in cases where code generation is only invoked once. You are correct that MCJIT won't work in this case because of the function-by-function approach used in the Kaleidoscope example. Basically, with MCJIT once code has been generated for a module nothing else can be added to the Module. Making Kaleidoscope work with MCJIT would require introducing some sort of scheme where a new module was created each time a new function was created. In the current implementation o...
2015 Jan 16
2
[LLVMdev] Function calls only being JIT'd once by Kaleidoscope with MCJIT?
...ig > and I'll dig in and try to see what's causing this to behave differently > for me. > > - Lang. > > On Fri, Dec 26, 2014 at 9:09 AM, Charlie Turner < > charlesturner7c5 at gmail.com> wrote: > >> 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 >> r...
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_MCJI...
2011 Jun 11
0
[LLVMdev] Kaleidoscope Build Error
(cc'ing llvm-dev) Hello Gregory, i just recompiled llvm from scratch, and was able to build the ocaml kaleidoscope bindings. Did you know the llvm's build system already can compile the kaleidoscope tutorials for you? You can run this to build them: make BUILD_EXAMPLES=1 Or just cd into the examples directory in your build directory, and run "make" there. Anyway, I think the problem you're...
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. Thanks for taking a look :) Charlie. On 16 January 20...
2013 Jun 04
1
[LLVMdev] MCJIT and Kaleidoscope Tutorial
...ionCache. So why lli.cpp does call JMM->invalidInstructionCache() explicitely again ? Also I think there is a bug in MCJIT::getPointerToFunction: ... StringRef BaseName = F->getName(); if (BaseName[0] == '\1') ... When BaseName is empty it triggers assertion. For example in Kaleidoscope tutorial an unnamed function is created. > > Even so, this will likely only work in cases where code generation is only invoked once. > > You are correct that MCJIT won't work in this case because of the function-by-function approach used in the Kaleidoscope example. Basically, wi...
2010 Nov 15
1
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...rm! :) > -----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 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->a...
2010 Jul 22
2
[LLVMdev] Is there a guide to LLVM's components?
...; Fibonacci, "examples\Fibonacci\Fibonacci.vcproj" FileCheck, "utils\FileCheck\FileCheck.vcproj" HowToUseJIT, "examples\HowToUseJIT\HowToUseJIT.vcproj" INSTALL, ".\INSTALL.vcproj" Kaleidoscope-Ch2, "examples\Kaleidoscope\Chapter2\Kaleidoscope-Ch2.vcproj" Kaleidoscope-Ch3, "examples\Kaleidoscope\Chapter3\Kaleidoscope-Ch3.vcproj" Kaleidoscope-Ch4, "examples\Kaleidoscope\Chapter4\Kaleidoscope-Ch4.vcproj" Kaleidosc...
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 created for each module? Unfortunately the tutorial text does not explain the rationale for this. At the moment in my implementation I am putting each...
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
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, true); }...
2010 Nov 16
2
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...shown in the tutorial, (sin(x)*sin(x) -> sin(x)^2), some attributes need to be set on 'sin'. Patch 'set-attribute' address this. Of course, this is probably not the right way to achieve this in real life with a real programming language / environment, but within the scope of the kaleidoscope, this should be sufficient. This patch updates both the source code & documentation. Best regards, -- Arnaud de Grandmaison -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Dan Gohman Sent: Monday, November 15, 2010 7:45 PM T...
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 > >...
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 simila...
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-list...
2010 Nov 15
1
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...118171) > -----Original Message----- > From: Duncan Sands [mailto:baldrick at free.fr] > Sent: Monday, November 15, 2010 4:32 PM > To: Rob Pieke > Cc: llvmdev at cs.uiuc.edu; Dan Gohman > Subject: Re: [LLVMdev] Optimization of calls to functions without side > effects (from Kaleidoscope example) > > Hi Rob, > > > I'm using the gvn pass, not sure about basic-aa. > > if you are using LLVM from svn then you need to specify the basic-aa > analysis, > otherwise gvn won't unify calls to readonly/readnone functions. This > is new > behaviour i...
2016 Apr 01
0
Kaleidoscope on Windows - bug maybe found?
...ed: extern "C" double putchard(double X) { putchar((char)X); return 0; } On Fri, Apr 1, 2016 at 2:42 AM, Russell Wallace <russell.wallace at gmail.com> wrote: > 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) { > retur...