similar to: LLVM Kaleidoscope : Compiling to Object Code - Segmentation Fault

Displaying 20 results from an estimated 700 matches similar to: "LLVM Kaleidoscope : Compiling to Object Code - Segmentation Fault"

2019 Jan 24
2
LLVM Kaleidoscope : Compiling to Object Code - Segmentation Fault
Hi David! Thanks for reaching out, the codegen part of the tutorial is fine, but when I try to generate the object code file, it throws segfault. Also please note that I'm using release build of llvm, actually I don't know whether that is the root cause or not. I also run through valgrind, it seems like a invalid read from stack. |||Error Summary: | |1 errors in context 1 of 1:
2018 Jan 24
2
[llvm] r322838 - [ADT] Split optional to only include copy mechanics and dtor for non-trivial types.
Hey Ben, This change broke some clangd code (no failing test, mea culpa), because it changed the move semantics. Previously: a moved-from llvm::Optional was None (for all types). Now: a moved-from llvm::Optional is None (for non-trivial types), and has the old value (for trivial types). FWIW, a moved-from std::optional is *not* nullopt, and contains the moved-from value. This seems sad to me,
2018 Jan 24
0
[llvm] r322838 - [ADT] Split optional to only include copy mechanics and dtor for non-trivial types.
That's an unintentional change. However, the reason for this change was to make optional of trivially copyable types trivially copyable, adding a user-provided move ctor would break that again :( I'm leaning towards making the non-trivial version of llvm::Optional more like std::optional. In the long term std::optional is going to replace llvm::Optional. How bad would that be for your use
2018 Jan 24
1
[llvm] r322838 - [ADT] Split optional to only include copy mechanics and dtor for non-trivial types.
On Wed, Jan 24, 2018 at 11:47 PM, Benjamin Kramer <benny.kra at gmail.com> wrote: > That's an unintentional change. However, the reason for this change > was to make optional of trivially copyable types trivially copyable, > adding a user-provided move ctor would break that again :( > > I'm leaning towards making the non-trivial version of llvm::Optional > more
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 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 Nov 15
2
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
> You need to set attribute ReadOnly on the sin / cos functions, using > Function::addFnAttr(Attribute) for example. Hmm ... I tried setting that right after Function::Create but I still get the same result (though flagged with "readonly") declare double @sin(double) readonly declare double @cos(double) readonly define double @foo(double %x) readonly { entry: %calltmp = call
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
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
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
Hi Rob, > Hmm ... I tried setting that right after Function::Create but I still get the same result (though flagged with "readonly") did you run the gvn pass (preceded by basic-aa)? Ciao, Duncan.
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
2018 Oct 01
2
Ubuntu LLVM packages incompatible with clang built projects?
On 09/29/2018 01:09 AM, Hans Wennborg via llvm-dev wrote: > Trunk still has the different gcc and clang versions. > > What's worse, the 7.0.0 release has them too :-( I completely missed > this and we can't fix it for 7.0.1 since that would also be an ABI > break. > Is this something we could fix by adding a symbol alias to the linker script for libLLVM.so? -Tom >
2008 Mar 31
5
[LLVMdev] Additional Optimization I'm Missing?
Hello, I'm working on using the LLVM JIT for a little project of mine, amazing work first off! I have a question about optimization passes. I initially have this function I've created, in python it looks like this: OS_end = 50OS_start = 0OS_timestep = 1birth_rate = .3population = 30.0for time in range(OS_start, OS_end, OS_timestep): births = birth_rate * population deaths = 0.1
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 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
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
Rob, I can reproduce the behaviour you observe using llvm top-of-tree. I will try to look into it. 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 4:27 PM To: Duncan Sands; llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Optimization of calls to
2010 Nov 15
0
[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 introduced by Dan; probably the tutorial should be updated. Ciao, Duncan. > > I've copied the code as-is from
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
2018 Sep 28
3
Ubuntu LLVM packages incompatible with clang built projects?
Just be aware that those ifdefs were recommitted and reverted several times, so I'm not sure what the state is. On Fri, Sep 28, 2018 at 8:48 AM Alastair Murray via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi Kern, > > We also had issues with mixing GCC/Clang builds when testing the 7.0 > release branch. > > My colleague submitted a patch that fixed the issue
2019 Mar 30
2
Minimal PGO for ORC JIT
Hi David, Thanks for your reply. I find that I need to add some new types of profile data that are specific to JIT environment like Function Ordering. Function Ordering is similar to dynamic call graph which records the execution of functions at runtime along with the order in which they are called. Eg: Suppose they are 5 functions (F1..F5). F1 calls other functions in the order described