similar to: [LLVMdev] how to use lllvm interpreter api ?

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] how to use lllvm interpreter api ?"

2010 Nov 02
1
[LLVMdev] Forcing the Interpreter segfaults
Hi everyone ! I am very new to LLVM and intent to use it in a research project. I have a problem with the interpreter: I have a simple compiler that generates LLVM bitcode, JIT it and execute it, and it works very well. Now I would like to execute it using the interpreter. And I get a segfault. Here is the code : // This code JIT the function and executes it llvm::InitializeNativeTarget();
2010 Nov 02
0
[LLVMdev] Forcing the Interpreter segfaults
In my case, I am working on a posix regular expression library that uses LLVM to execute a regular expression. Each regular expression is a very small sets of code and is faster to interpret than to JIT then execute. I wanted to JIT only when the regular expression is executed more than 20 times. The benchmarks I have run show that my library is amzingly fast to execute a regular expression
2010 Nov 02
2
[LLVMdev] Forcing the Interpreter segfaults
Helps to send to list: On Tue, Nov 2, 2010 at 1:00 PM, OvermindDL1 <overminddl1 at gmail.com> wrote: > On Tue, Nov 2, 2010 at 12:51 PM, Salomon Brys <salomon.brys at gmail.com> wrote: >> Hi everyone ! >> I am very new to LLVM and intent to use it in a research project. >> I have a problem with the interpreter: I have a simple compiler that >> generates LLVM
2012 Jul 07
2
[LLVMdev] Crash using the JIT on x86 but work on x64
Hello everyone, i’m using LLVM (updated to 3.1 after seeing that bug, but it’s the same with 3.0) for running a bitcode on a C++ program, and Clang for compiling it. My code work perfectly, as expected on x64, but crash on x86. I’m on Windows 7 x64 and LLVM + Clang was compiled using Visual Studio 2010 (tested in both Release and Debug build). Project was make using CMake. Here is my code:
2012 Sep 19
0
[LLVMdev] newbie question on getelementptr
Hi Óscar, Thank you for your prompt reply. Unfortunately, I still need more guidance as using the Demo page to generate C++ code didn't result in a global variable being used. Basically, I'm following your advice to use a LoadInst: Value *v = new LoadInst(result, "", theBasicBlock); Function *myfn = cast<Function>(v); I was not sure how I could get a BasicBlock for the
2010 Nov 03
0
[LLVMdev] Fw: Forcing the Interpreter segfaults
Hi Salomon, please don't forget to reply to the list too (I've CC'd the list). > I don't think my code is doing anything worng... No, it looks fine to me, and the interpreter certainly supports this. That suggests that the value of %str is not being transmitted to the function right. If it is getting the wrong pointer value, that would explain why it barfs. Ciao, Duncan.
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
2012 May 28
0
[LLVMdev] Help with Values sign
In my main function after generate the code and before start the execution via JIT I do this: ExecutionEngine *EE = EngineBuilder(M).create(); string str = EE->getTargetData()->getStringRepresentation(); str[0] = 'e'; M->setDataLayout(str); if (verifyModule(*M)) { errs() << argv[0] << ": Error building the
2013 Nov 10
1
[LLVMdev] about creating the first value of the storeinst
Dear All I'm trying to create storeInst using StoreInst *SI = new StoreInst(val, AI, BB); AI is an alloca instruction previously created, BB is the basicBlock I want to put instructionsi in. Val is the value to store. I've created val from a genericValue like this: Value* val = ConstantInt::get(getGlobalContext(), Result.IntVal); Result is the genericValue However I keep getting
2013 Jul 18
2
[LLVMdev] LLVM 3.3 JIT code speed
Hi, Our DSL LLVM IR emitted code (optimized with -O3 kind of IR ==> IR passes) runs slower when executed with the LLVM 3.3 JIT, compared to what we had with LLVM 3.1. What could be the reason? I tried to play with TargetOptions without any success… Here is the kind of code we use to allocate the JIT: EngineBuilder builder(fResult->fModule);
2013 Feb 20
0
[LLVMdev] LLVM Interpreter & QSort
Hi, I am trying to run an LLVM analysis on a C++ program that calls qsort(), using the LLVM interpreter (lli --force-interpreter). The code is the qsort_large.c file in the MiBench benchmark suite. If I comment the qsort() call, the execution works fine. If I uncomment the qsort() call, I run into a segmentation fault error as follows: 0  lli             0x0000000000d35c6f 1  lli        
2013 Feb 20
0
[LLVMdev] LLVM Interpreter & Qsort
Hi, I am trying to run an LLVM analysis on a C++ program that calls qsort(), using the LLVM interpreter (lli --force-interpreter). The code is the qsort_large.c file in the MiBench benchmark suite. If I comment the qsort() call, the execution works fine. If I uncomment the qsort() call, I run into a segmentation fault error as follows: 0 lli 0x0000000000d35c6f 1 lli
2013 Jul 18
0
[LLVMdev] LLVM 3.3 JIT code speed
On Thu, Jul 18, 2013 at 9:07 AM, Stéphane Letz <letz at grame.fr> wrote: > Hi, > > Our DSL LLVM IR emitted code (optimized with -O3 kind of IR ==> IR passes) runs slower when executed with the LLVM 3.3 JIT, compared to what we had with LLVM 3.1. What could be the reason? > > I tried to play with TargetOptions without any success… > > Here is the kind of code we use to
2004 Aug 10
1
[LLVMdev] API on JIT, code snippets
Valery, Your JIT sample program has been added to projects/HowToUseJIT. I have defaulted the license to the standard UIUC license. Let me know if that's not okay and I'll fix it. If you continue to work on this (providing a command line option to use either interpreter or JIT would be nice), please provide patches against these files and I'll commit them for you. Here's the
2005 Mar 08
1
[LLVMdev] Making Constants from GenericValues
I'm trying to turn some GenericValues into Constants in the interpreter using code like this, in a switch statement: case Type::IntTyID: SI = ConstantSInt::get(FB->getType(), ArgVals[i].IntVal); params.push_back(UI); UI->dump(); //for testing break; FB is a Function::ArgumentListType::iterator ArgVals is a std::vector<GenericValue> the switch
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
On Mon, 9 Aug 2004, Reid Spencer wrote: > Attached are three files: "valery.cpp" which contains your original, "reid.cpp" > which contains corrections to most of the FIXME items and "diffs" which shows > the differences between them. The differences should be instructive on what to > do. You were really, really close .. just a few details changing. The
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
Valery, That's pretty cute actually. Do you want this "brilliant" :) example in the cvs repository? I'd be happy to put it in. Reid. Valery A.Khamenya wrote: > Hi LLVMers, > > the example attached I have used to prove that JIT and some visible > optimizations are really invoked. > > Proved OK. I got 30% speed-up in comparison to gcc 3.3.3 >
2012 May 28
1
[LLVMdev] Help with Values sign
Why are you changing the data layout to be little-endian? Joey On 28 May 2012 10:13, Santos Merino <santitox at hotmail.es> wrote: > In my main function after generate the code and before start the execution > via > JIT I do this: > > ExecutionEngine *EE = EngineBuilder(M).create(); > string str = > EE->getTargetData()->getStringRepresentation();
2009 Jul 25
3
[LLVMdev] Bug in ExecutionEngine::getConstantValue() -- Instruction::PtrToInt
I think I might have found a bug in the exection engine's 'constants folding'. Basically APInt's parameters are the wrong way round. Line 577 for lib/ExecutionEngine/ExecutionEngine.cpp :- case Instruction::PtrToInt: { GenericValue GV = getConstantValue(Op0); uint32_t PtrWidth = TD->getPointerSizeInBits(); GV.IntVal = APInt(PtrWidth,
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
On second thought, the makefiles don't (easily) allow this do they? You can only build one program per directory. Were you suggesting that you wanted me to move the entire directories under a "small examples" directory? Reid. Chris Lattner wrote: > On Tue, 17 Aug 2004, Reid Spencer wrote: > > >>That's pretty cute actually. Do you want this