similar to: [LLVMdev] How to pass an array to a function using GenericValue

Displaying 20 results from an estimated 6000 matches similar to: "[LLVMdev] How to pass an array to a function using GenericValue"

2012 Jan 12
0
[LLVMdev] How to pass an array to a function using GenericValue
Hi Alan, On 12/01/12 20:19, Alan Garny wrote: >>> Yes, it was the entire LLVM assembly code that I generated. However, I >>> have now prepended targetdata to the code I generate (using >>> executionEngine->getTargetData()->getStringRepresentation()), but to >>> executionEngine->no >>> avail. I still get the exact same result...?! >>
2012 Jan 12
0
[LLVMdev] How to pass an array to a function using GenericValue
Hi Alan, > if I have the following LLVM assembly code: > > define void @test(double* %data) { > > %1 = getelementptr inbounds double* %data, i64 1 > > store double 1.230000e+02, double* %1, align 8 > > %2 = getelementptr inbounds double* %data, i64 3 > > store double 1.230000e+02, double* %2, align 8 > > ret void > > } is this the entire LLVM IR? If
2012 Jan 12
1
[LLVMdev] How to pass an array to a function using GenericValue
> > Yes, it was the entire LLVM assembly code that I generated. However, I > > have now prepended targetdata to the code I generate (using > > executionEngine->getTargetData()->getStringRepresentation()), but to > > executionEngine->no > > avail. I still get the exact same result...?! > > What is the string you prepended? If the execution engine
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
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();
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
2008 May 28
1
[LLVMdev] Asm output while executing
Hello, I'm trying to catch assembly output and do some formatting for its presentation while being executed. I face a problem, which is clear from the error, although I have no clue on how to do it otherwise. If generating the code for its asm output and then for jit execution I get: ********** static llvm::MachineFunction& llvm::MachineFunction::construct(const llvm::Function*, const
2007 Nov 08
3
[LLVMdev] Newbie JITter
Hi, I'm experimenting with using LLVM to generate dynamic FFI bridges in VisualWorks Smalltalk. LLVM is an amazing thing! I'm going from dynamically generated assembler source to machine code, and I have that all working, copied from the llc tool and the JIT example. I have two questions: 1. What optimization passes, if any, should I run on the module before I pass it to the
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
Hi, I'm using LLVM 2.4 (but llvm-gcc 2.2) on Ubuntu 8.10 (Intrepid Ibex) for a small part-time project combining Witty (http://www.webtoolkit.eu) and the ExecutionEngine in LLVM. (This is my second week with any of these so I still lack a lot of basic knowledge.) Sometimes I want to call a function returing a struct (in this case std::string), thus hasStructRetAttr() is true for the Function
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 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:
2007 Nov 09
0
[LLVMdev] Newbie JITter
On Nov 7, 2007, at 6:10 PM, Antony Blakey wrote: > Hi, > I'm experimenting with using LLVM to generate dynamic FFI bridges > in VisualWorks Smalltalk. LLVM is an amazing thing! I'm going from > dynamically generated assembler source to machine code, and I have > that all working, copied from the llc tool and the JIT example. I > have two questions: > > 1. What
2009 Feb 19
3
[LLVMdev] Possible DAGCombiner or TargetData Bug
I got bit by this in LLVM 2.4 DagCombiner.cpp and it's still in trunk: SDValue DAGCombiner::visitSTORE(SDNode *N) { [...] // If this is a store of a bit convert, store the input value if the // resultant store does not need a higher alignment than the original. if (Value.getOpcode() == ISD::BIT_CONVERT && !ST->isTruncatingStore() && ST->isUnindexed()) {
2013 Mar 28
1
[LLVMdev] LLVM Execution engine: Native call vs LLVM IR function call
Hi Óscar, Thank you for your response. I did not explicitly optimize the IR. I compile and run the two versions with ... GenericValue gv = EE->runFunction(bsqr, args); ... GenericValue gv2 = EE->runFunction(cppnat, args); I am calling method runFunction of ExecutionEngine. I am using the default code gen optimization level. Best regards, Nurudeen. On Thu, March 28, 2013 7:05 am, Óscar
2007 Jan 22
2
[LLVMdev] addPassesToEmit(Whole)File changes?
Hi folks, just installed the new llvm 1.9 build and noticed that my code no longer worked. It seems something has changed with addPassesToEmitFile(). First, the arguments to that method changed so that it no longer takes a PassManager, but only a FunctionPassManager. Instead there is a addPassesToEmitWholeFile() method, but that is marked as optional, and when I change my code 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
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
2010 May 28
4
[LLVMdev] how to get TargetData?
Dear all I am trying to get the size of an LLVM pointer type. getPrimitiveSizeInBits() returns 0 for it and the documentation for isSized() suggest to use TargetData. I figured out from Kaleidoscope example that one can get a pointer to TagetData object through the execution engine but it seems to be an overkill. What is the right way to do it? Best regards, Victor -------------- next part
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
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.