similar to: [LLVMdev] Kaleidoscope doesn't work properly

Displaying 20 results from an estimated 400 matches similar to: "[LLVMdev] Kaleidoscope doesn't work properly"

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?
2017 Feb 06
3
Kaleidoscope tutorial: comments, corrections and Windows support
Hi, I'm currently working my way through the tutorial with LLVM 3.9.1 on Windows (finished chapter 4) and stumbled over a few things which could be improved: - "LLVMContext" does not exist as a variable -> "TheContext" - Chapter 3: 5 times - Chapter 4: 1 time - Chapter 5: 4 times - Chapter 6: 2 times - Chapter 7: 2 times 3.4. Function Code
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]
2008 Sep 01
3
[LLVMdev] Unresolveable fallthrough functions
Hello, > ready> ERROR: Program used external function 'putchard' which could not be > resolved! > Any idea of what could be wrong? Please make sure you're using C linkage for such functions, due to mangling the name of function being emitted is not "putchard". Something like this: extern "C" void putchard(char c) { ... } Or, just provide a mapping
2008 Sep 01
0
[LLVMdev] Unresolveable fallthrough functions
Anton Korobeynikov wrote: > > Hello, > >> ready> ERROR: Program used external function 'putchard' which could not >> be >> resolved! >> Any idea of what could be wrong? > Please make sure you're using C linkage for such functions, due to > mangling the name of > function being emitted is not "putchard". Something like this: >
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
I am new to llvm so I might be missing a critical step. My system is Fedora 12 but this also happens in Mac OS X 10.6.2. Here are the steps I used to compile llvm: export TARGETS=x86,x86_64,cpp export INSTALLDIR=/home/rovitotv/llvm ../llvm-2.6/configure --prefix=$INSTALLDIR --enable-bindings=none --enable-targets=$TARGETS --enable-optimized --with-llvmgccdir=$INSTALLDIR
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
First, you have to call llvm-g++ to use the llvm-gcc front end, but it doesn't matter here. I'd like to suggest that you use pastebin to put your code and the send us the link, so that we can download it. The problem is that TheExecutionEngine is set to NULL (maybe because of a previous error), but it will be really better if you use pastebin. On Wed, Feb 17, 2010 at 6:01 AM, Todd Rovito
2010 Aug 12
2
[LLVMdev] Instruction does not dominate all uses?
This has been driving me crazy. In order to JIT stuff in a simple REPL I'm trying to wrap them in anonymous functions and then evaluate them (as per recommendation of the Kaleidoscope guide). With simple expressions it works fine. Like if I try and add 4 and 5, I get this from the bare llvm::Value dump: double 9.000000e+00 and this after it's wrapped in a function: define double @0() {
2010 Nov 15
2
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
In http://llvm.org/docs/tutorial/LangImpl4.html#jit there's an example that optimizes calls to functions without side effects. Specifically, ready> extern sin(x); ready> extern cos(x); ready> def foo(x) sin(x)*sin(x) + cos(x)*cos(x); Read function definition: define double @foo(double %x) { entry: %calltmp = call double @sin(double %x) %multmp = fmul double %calltmp,
2010 Nov 12
4
[LLVMdev] C Backend's future
Chris Lattner <clattner at apple.com> writes: > On Nov 5, 2010, at 7:11 AM, Kirk Kelsey wrote: > >> I'm wondering what the longer term plans are for the C Backend. I >> understand it's not actively developed, even deprecated. What I'm not >> clear about is whether it's something that is viewed as non-vital and >> should just as well go away, or
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
Hi Rob, You need to set attribute ReadOnly on the sin / cos functions, using Function::addFnAttr(Attribute) for example. Best regards, -- Arnaud de Grandmaison -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Rob Pieke Sent: Monday, November 15, 2010 11:41 AM To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] Optimization of calls
2010 Aug 12
0
[LLVMdev] Instruction does not dominate all uses?
You need to insert v into the basic block before the return. Note that %calltmp is absent from the dump of the function. The verifier is complaining because it found this pointer to %calltmp, but it didn't find the definition anywhere above its use. Reid On Thu, Aug 12, 2010 at 1:04 PM, alecbenzer <alecbenzer at gmail.com> wrote: > > This has been driving me crazy. In order to
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 01
0
[LLVMdev] Unresolveable fallthrough functions
Hi, I'm following the Kaleidoscope tutorial (which is very good btw) and am having difficulties having function calls for functions that haven't been defined getting resolved to plain C++ functions. In the tutorial (end of chapter 4), executing "extern putchard(x); putchard(120);" should execute the corresponding C++ function defined in the same file. Unfortunately in my case it
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
2014 May 04
3
[LLVMdev] function pointer from name?
Don't you have the same problem with other atoms, e.g. variable names? This sounds like something that should be implemented in the language's runtime library. On May 4, 2014 7:15 PM, "Alexander Popolitov" <popolit at gmail.com> wrote: > Hi everyone! > > I'm trying to implement lisp's funcall function, which roughly calls a > function, name of which
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,
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
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
2016 Sep 19
3
llvm interpreter does not find function defined by addGlobalMapping
Hi, I want to use a function defined in c(++)-code from code generated by llvm. For this I use ExecutionEngine.addGlobalMapping(). I started with the JIT execution engine and everything worked, then I switched to the interpreter engine and it stopped working, but only if compiled on a Linux system. More precisely it works if I use llvm 3.8.1 + gcc (Linux) + JIT llvm 3.8.0 + mingw-gcc