similar to: [LLVMdev] How to run CppBackend with Kaleidoscope?

Displaying 20 results from an estimated 40000 matches similar to: "[LLVMdev] How to run CppBackend with Kaleidoscope?"

2013 Mar 26
0
[LLVMdev] Fwd: Extending Kaleidoscope to support Strings
I hope this is the right place to ask this question. If not, please let me know where I can ask for help. We are using Kaleidoscope as the base framework to write a source to source compiler. Our source language has Strings with supported operations such as concatenation, upper case, and substrings. I am following the patterns set forth in Kaleidoscope, and need to represent my std::string as
2013 Apr 21
2
[LLVMdev] How to cast Value* to ConstantDataArray*
ConstantDataArray * cda = cast<ConstantDataArray>(v); throws this error: Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /Users/rcatlin1/lldb/llvm/include/llvm/Support/Casting.h, line 208 Thanks for the help. Richard Catlin On Sat, Apr 20, 2013 at 3:37 PM, Sean Silva <silvas at purdue.edu> wrote:
2013 Apr 20
0
[LLVMdev] How to cast Value* to ConstantDataArray*
On Sat, Apr 20, 2013 at 5:15 PM, Richard Catlin <richard.m.catlin at gmail.com>wrote: > I extended the LLVM Kaleidoscope example to support Strings. I added a > StringExprAST, which has the virtual Codegen method impl as follows: > > Value *StringExprAST::Codegen() { > StringRef r(Val); > return ConstantDataArray::getString(getGlobalContext(), r, false); > } >
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
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
1
[LLVMdev] MCJIT and Kaleidoscope Tutorial
Hi Andrew, Am 04.06.2013 02:13, schrieb Kaylor, Andrew: > 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
2016 Apr 01
0
Kaleidoscope on Windows - bug maybe found?
Addendum: this still fails: auto ExprSymbol = J.findSymbol("putchard"); As yet, I have no idea why - that symbol even seemed to be exported: 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
2012 Apr 12
0
[LLVMdev] Native codegen
On Fri, Apr 13, 2012 at 03:32:01AM +1200, James Miller wrote: > * Tom Stellard <thomas.stellard at amd.com> [2012-04-12 10:54:17 -0400]: > > > On Fri, Apr 13, 2012 at 02:41:58AM +1200, James Miller wrote: > > > Hi, I've just started working with LLVM, and have just finished the > > > Kaleidoscope tutorial. Everything is fine, however I am finding it >
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 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
2012 Sep 20
0
[LLVMdev] Programmatically converting LLVM IR to native code
On Thu, Sep 20, 2012 at 2:42 AM, Baris Aktemur <baris.aktemur at ozyegin.edu.tr> wrote: > I am generating LLVM IR code and I would like to convert this IR code to > native code using the LLVM C++ API. This would be very similar to what's > done in the Kaleidoscope tutorial, but instead of relying on JIT > compilation, I'd like to emit native code -- the same native code
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
2010 Aug 13
0
[LLVMdev] Kaleidoscope example control flow to c like control flow?
Can anyone point me in the right direction so i can have c like control flow in the Kaleidoscope example. for example in Kaleidoscope it's if a < 5 then //do something; to if (a < 5) { //do something } im trying to use LLVM to create an audio signal processing library/code for my music application to create music synths and audio effects. Thanks. -- View this message in
2016 May 04
2
Is the CppBackend still supported?
The usual advice I provide people is "see what Clang does with an equivalent C construct" On Wed, May 4, 2016 at 12:18 PM, Stanislav Manilov < stanislav.manilov at gmail.com> wrote: > Hi, > > There is another benefit to keeping the CppBackend: it's great for > learning how to use the IR and the C++ API in particular, as can be seen > from this SO Q&A: >
2010 Nov 16
2
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
Hi Dan, The tutorial in r119335 does not build : the basicAA pass creation needs to be declared. This is addressed with the 'missing-include' patch, which updates both source code & documentation. The second point is that beside basicAA, to get the optimizations as shown in the tutorial, (sin(x)*sin(x) -> sin(x)^2), some attributes need to be set on 'sin'. Patch
2010 Jan 31
0
[LLVMdev] Compiling Kaleidoscope on Windows
Thanks to OvermindDL1 for pointing this out: compiling with Visual C++ actually works! Basically it's just a matter of running cmake (default settings are fine) then nmake, and I've got what appears to be a working version of LLVM. Kaleidoscope crashes on attempting to exit with ^Z: C:\llvm\bin>Kaleidoscope.exe ready> 1+2; ready> Evaluated to 3.000000 ready> 3*4; ready>
2015 Feb 10
2
[LLVMdev] Some basic questions regarding MCJIT and Kaleidoscope sample
HI Dibyendu, A single MCJIT instance can notionally manage multiple modules, but there are caveats (which I'm afraid I don't remember off the top of my head) that make it unattractive in practice. I believe most clients opt for something like the ExecutionEngine-per-Module model used in the Kaleidoscope tutorials. As Dave mentioned, I'm also working on some new JIT APIs (Orc) that
2016 May 04
2
Is the CppBackend still supported?
On Wed, May 4, 2016 at 3:10 PM, Stanislav Manilov < stanislav.manilov at gmail.com> wrote: > As in "look at the source of clang" or as in "look at the -S -emit-llvm" > output? If you mean the former, then would that be easy for someone who > hasn't seen the clang source before? > Generally the latter - then potentially set some breakpoints & look at
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
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