Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Segmentation fault - Kaleidoscope"
2009 Jun 17
0
[LLVMdev] Segmentation fault - Kaleidoscope
FWIW, I'm also suddenly experiencing segfaults in code that used to work
a few days ago (I'm using svn). This may be unrelated to the problem
described below, but perhaps it's the same thing.
In my case it seems that creating an ExecutionEngine has changed. I used
to do
Module* Mod = makeLLVMModule(); // basically create a gcd function
verifyModule(*Mod,
2009 Jun 17
10
[LLVMdev] Segmentation fault - Kaleidoscope
On Jun 17, 2009, at 9:46 AM, Paul Melis wrote:
> FWIW, I'm also suddenly experiencing segfaults in code that used to
> work
> a few days ago (I'm using svn). This may be unrelated to the problem
> described below, but perhaps it's the same thing.
>
> In my case it seems that creating an ExecutionEngine has changed. I
> used
> to do
>
> Module* Mod
2009 Jun 17
0
[LLVMdev] Segmentation fault - Kaleidoscope
Hello,
Maybe my version (LLVM 2.5) is incomplete... now get this error:
toy.cpp:11:38: error: llvm/Target/TargetSelect.h: No such file or directory
How can I get this file?
Regards,
Juan Carlos
On Wed, Jun 17, 2009 at 12:51 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Jun 17, 2009, at 9:46 AM, Paul Melis wrote:
>
> > FWIW, I'm also suddenly experiencing
2011 Aug 31
2
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
Hello Everyone,
I am trying to create two modules in LLVM, where first module contains
the definition of a function, gcd in this example and another module
contains a call to this function. My example is based on the following
tutorial, with a few changes.
http://llvm.org/releases/2.6/docs/tutorial/JITTutorial2.html
When I execute the verifier pass on my modules, it complains that the
2012 Jun 11
2
[LLVMdev] Why always abort in verifyFunction?
Hello everyone:
I have a little question about the second argument *action* of
verifyFunction.
In docs:
*Enumerator: * *AbortProcessAction*
verifyModule will print to stderr and abort()
*PrintMessageAction*
verifyModule will print to stderr and return true
*ReturnStatusAction*
verifyModule will just return true
But it still abort when I pass
2016 Feb 16
2
LLVM IR to C++
Hi,
I want to convert LLVM bitcode files to cpp. I use these commands:
1. clang -c -emit-llvm -fopenmp=libiomp5 oh2.c -o oh2.bc2. llc -march=cpp oh2.bc -o oh2.cpp3. g++ -fno-rtti -O0 -g `$HOME/llvmbuild/bin/llvm-config --cxxflags` oh2.cpp `$HOME/llvmbuild/bin/llvm-config --ldflags --libs --system-libs` -o oh2c
After the 3rd command, I get a lot of compilation errors. Is it possible that llc
2012 Jun 11
0
[LLVMdev] Why always abort in verifyFunction?
Hi Xiu,
The Verifier pass runs a PreVerifier pass, which does not honour the action
argument,
and will always abort on a broken module, (Line 106,
lib/VMCore/Verifier.cpp)
Perhaps you should file a bug against this, to allow you to not abort if
you so wish.
Joey
On 11 June 2012 09:41, Guowei Xu <myesis at gmail.com> wrote:
> Hello everyone:
>
> I have a little question
2007 Dec 26
2
[LLVMdev] Instantiating modules from .bc files
Hey there,
I'm relatively new to the llvm scene, and so far I'm liking it quite
a bit. I'm a bit perplexed as to what llvm-gcc's role is in
everything. I've used it to create .bc files for really simple
functions and it seems to do quite well at that, but I've been trying
to figure out how to take the output from llvm-gcc and actually use
it in another program.
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
2013 Nov 26
2
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
Hello,
using the LLVM API, I've build one very simple function that adds two
ConstantInts and returns the result.
I noticed that, when I emit IR code, it is optimized to a simple "ret
i16 42" when I add 40 and 2. I'd like to see the operations that are
necessary to compute the result, though.
Can I somehow disable this optimization in the pass, leading to more
verbose IR code?
2007 Dec 26
0
[LLVMdev] Instantiating modules from .bc files
Hi Danny,
On 2007-12-26, at 15:39, Danny wrote:
> I've noticed that the BitcodeReader appears to be an internal
> module, but the BitstreamReader is public. Should I be using the
> BitstreamReader? If so how.
The generic BitstreamReader class is public because it's used in other
projects, including clang, to serialize data structures other than
LLVM IR. The coding of
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
2007 Dec 27
1
[LLVMdev] Instantiating modules from .bc files
That worked quite well. Thank you. One question as a follow up: is
there a nice/standard way of including the pre-made bitcode chunks in
with the binaries that are being created which read them?
Bascially, I'd like to have the same functionality, but rather than
having one or more .bc files running around which need to be read at
runtime by an executable, moving that into the code
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
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
2008 Dec 02
1
[LLVMdev] Kaleidoscope tutorial failed at Chapter 4...
Hi everyone. I am using LLVM 2.4 release to practise the tutorial at
Kaleidoscope Chapter 4.
I built the LLVM library, and created my own project, and then paste the
code from the tutorial into my own project. Then after compiled and built
it, I passed the built stage. (I am using visual studio 2005 )
However, when I tried to input some code in the command line window, the
sample program crashed.
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.
2012 May 28
2
[LLVMdev] Help with Values sign
On May 27, 2012, at 9:15 PM, Santos Merino wrote:
> I have found that the problem is the endianness of Values. For example a 1 it's
> stored as 00000001 00000000 00000000 0000000 instead of 0000000 00000000 0000000
> 00000000 so how can I change how the values are stored and/or load (because I
> suppose that the problem is when I store it or load from memory)
Are you setting up
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
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