similar to: [LLVMdev] LLVM-Kaleidoscope tutorial

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] LLVM-Kaleidoscope tutorial"

2010 Apr 28
1
[LLVMdev] LLVM Tutorial 1: Something got wrong?
it seems the code snippit below cann't be compiled throuth. the compiler complains: error: no matching function for call to ‘llvm::IntegerType::get(int)’ /usr/local/include/llvm/DerivedTypes.h:108: note: candidates are: static const llvm::IntegerType* llvm::IntegerType::get(llvm::LLVMContext&, unsigned int) Module* makeLLVMModule() { // Module Construction Module* mod = new
2009 Oct 03
1
[LLVMdev] code generation goes into an infinite loop
We seem to be creating an infinite loop in llvm while trying to implement the simplest possible code generation. Specifically, we are trying to emit code for the following program, as it is easily testable from the command-line: int main(int argc) { return argc; } We got our code generator to build and link with llvm. When we run it, it pauses when running the PrintModulePass and then
2012 Jun 17
3
[LLVMdev] BlockAddress instruction is copied instead of cloned during module link?
I have a module having the blockaddress instruction. When I link it into another module and delete the original, blockaddress disappears and is replaced by inttoptr (i32 1 to i8*). Please compile and run the attached program to see the demo of this problem. Right after linking modules, blockaddress still exists: @switch.bbs = internal global [3 x i8*] [i8* blockaddress(@my_func,
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 > > 2009/10/3 Remy Demarest <remy.demarest at
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,
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
2009 Jan 19
6
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
This is x86_64. I have a problem where an absolute memory load define i32 @foo() { entry: %0 = load i32* inttoptr (i64 12704196 to i32*) ; <i32> [#uses=1] ret i32 %0 } generates incorrect code on LLVM 2.4: 0x7ffff6d54010: mov 0xc1d9c4(%rip),%eax # 0x7ffff79719da 0x7ffff6d54016: retq should be 0x7ffff6d54010: mov 0xc1d9c4, %eax 0x7ffff6d54016: retq
2013 Nov 26
0
[LLVMdev] Help needed with a pass
I'm a newbie to LLVM and I've really been struggling to write a pass which changes the behavior of the following function: #include<stdlib.h>#include<stdio.h>#include<string.h>void foo(char* bar){const char* path;path=getenv(<SOME_ENV_VAR>); if (path!=NULL){strcpy(bar,path);}else{printf("env_var not set!");}} In the pass, I hope to invoke
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?
2013 Nov 28
0
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
IRBuilder is a templated class, and one of the template arguments is the constant folder to use. By default it uses the ConstantFolder class which does target-independant constant folding. If you want to disable constant folding you can specify the NoFolder class instead, i.e. declare the builder as follows: IRBuilder<true, llvm::NoFolder> builder(body) On 26 Nov 2013, at 19:23, Daniel
2009 Jun 17
3
[LLVMdev] Segmentation fault - Kaleidoscope
Hello, Following the tutorial "Kaleidoscope: Adding JIT and Optimizer Support", I found a Segmentation fault when I try to execute it. I am new in the neighbourhood, so I don't know what is wrong. Could you help me with that? I am working with the last version of LLVM (2.5). The code in chapter 2 and 3 works good, but the code in the chapter 4 did not work. Below are the detail of
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
1999 May 10
2
netbios server failing
Hi, I got such message: hostname inetd[111]: netbios-ns/udp server failing (looping), service terminated What does it mean ? How can I correct it ? By there przemol
2015 Jan 22
2
[LLVMdev] access IntegerType::getSignBit from Type *
Hi, I have a Type * which may come from an IntegerType as shown below: Type.getIntegerBitWidth() tells me numBits. But how to extract the IntegerType.getSignBit? If pType isIntegerType, I need to know if it is signed or unsigned... How to achieve this? Thx Alex llvm::Type * getRandomValid_IntegerType(llvm::LLVMContext &C) { using namespace llvm; //--- determine num of bits
2016 Sep 07
2
Receiving LLVM Error in Custom Backend
Hi, I am receiving an LLVM Error from a custom 16-bit backend I am creating. I am having trouble understanding the error/problem and how to go about solving it. The error is: LLVM ERROR: Cannot select: t29: i32,ch = load<LD2[%x.addr], anyext from i16> t14, FrameIndex:i16<0>, undef:i16 t7: i16 = FrameIndex<0> t9: i16 = undef In function: mul_add Can anyone provide any
2014 Jan 08
3
[LLVMdev] reference to non-static member function must be called
Hi,everyone. I'm writing a pass in which a CallInst to an external function will be inserted. The function is declared like this: void func(int a, unsigned chat *p); and in the Pass(a Function Pass ,and using the InstVistor template ), I wrote like this: void visitStoreInst(StoreInst &SI) { //Get the refference of the types Module *M =
2013 Apr 16
1
[LLVMdev] creating and inserting a function with variable arguments
The code that I have written to get the function type is: const std::vector<Type *> ParamTys; ParamTys.push_back(IntegerType::getInt32Ty(Context)); ParamTys.push_back(IntegerType::getInt32Ty(Context)); ParamTys.push_back(IntegerType::getInt32Ty(Context)); ParamTys.push_back(PointerType::get(Type::getVoidTy(Context), 0)); ParamTys.push_back(PointerType::get(Type::getVoidTy(Context), 0));
2008 Jan 04
0
[LLVMdev] Vectors and function calls across modules
Hey all, thanks for your prompt replies from before, now I have more questions! First, I've heard rumors about the ability to call functions across modules. I'm interested in learning how, but I haven't been able to figure it out yet. I tried just taking a Function* that I got from one module and calling it from another one, but that didn't work. How do I do that? Second,
1999 May 11
2
Unsubsribe
Best Regards, Mike Garver _________________________ Marketing Associate Deerfield.com http://www.deerfield.com/ sales@deerfield.com ---------------------------------------------------------------------- Please download and try our other exciting software products: ---------------------------------------------------------------------- WinGate - http://www.wingate.com/ FTP Voyager -