similar to: [LLVMdev] code generation goes into an infinite loop

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] code generation goes into an infinite loop"

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
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
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 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
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
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
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
2006 Feb 03
0
Warcraft III won't run
I have installed Warcraft III + Frozen throne. I use wine 0.9.6 from Debian. I deleted my old .wine before installing. I can't start the game: philipp@notebook2:~/.wine/drive_c/Programme/Warcraft III$ wine "Frozen Throne.exe" -opengl err:winspool:AddPrinterW Printername L"LaserJet-4-series---CUPS+Gutenprint-v5.0.0-rc2" must not exceed length of DEVM ODE.dmDeviceName !
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,
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
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
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?
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 =
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
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));
2011 May 13
3
[LLVMdev] IO intrinsics?
I found these lines in the BrainF example: //declare i32 @getchar() getchar_func = cast<Function>(module-> getOrInsertFunction("getchar", IntegerType::getInt32Ty(C), NULL)); //declare i32 @putchar(i32) putchar_func = cast<Function>(module-> getOrInsertFunction("putchar", IntegerType::getInt32Ty(C),
2010 Nov 18
0
[LLVMdev] How to construct parameters for a insert function? one from a return value from previous call, the other one is a string....
Hi, I want to insert a write operation to a fd opened, but I have some questions to construct parameters to pass to function that I want to insert, because one from a return value from previous call, the other one is a string, The detailed description of the problem is as follows; I have: int fd = open(g_settings_path, O_RDONLY); and I want to insert this function after the instruction above:
2010 Nov 23
1
[LLVMdev] how to get a void type value in llvm
Hi, sivart Thanks for pointing it out. I used it, and it works. Thank you again. BTW, for any later reference, the function prototype declaration with no arguments is not what I wrote: fcall2 = M.getOrInsertFunction("foo", IntegerType::get(M.getContext(), 32), Type::getVoidTy(M.getContext())); INSTEAD, I changed to : fcall2 = M.getOrInsertFunction("foo",
2013 Jul 25
2
[LLVMdev] Error for AllocaInst and Instruction
Hi, For the following code const Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext()); AllocaInst* newInst = new AllocaInst(Int32Type, 0, "flag", Bb); Bb->getInstList().push_back(newInst); It gives me the error " error: no matching constructor for initialization of 'llvm::AllocaInst' AllocaInst* newInst = new