similar to: [LLVMdev] Fwd: Basic questions

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Fwd: Basic questions"

2008 Nov 09
0
[LLVMdev] Fwd: Basic questions
> I'd like to support users dynamically adding and using functions > (plus structs, globals etc) to a Module, JIT compiling to an > ExecutionEngine, in an interleaved fashion. That is, declare & define > a function, run it through a FunctionPassManager, add it to an > ExecutionEngine, use it, go ahead and repeat for a different function > with the same Module,
2008 Nov 06
0
[LLVMdev] Basic questions
Hi, The JIT engine currently uses a single memory block for all functions that you JIT-compile (and global variables, constants, etc..). Still, you can easily create and delete machine code. You can use the following functions: engine->freeMachineCodeForFunction(function); // clean the JITed code function->eraseFromParent(); // clean a function's IR About the lifetime of the classes,
2008 Nov 04
2
[LLVMdev] Basic questions
Hi, I apologize in advance if this is not the correct place to ask these questions, but I would be very grateful for redirection to the appropriate list/docs if so. I've just started with LLVM in the last week or so, and have worked my way through the Kaleidoscope tutorial, the IR docs & programmers manual, plus a few of the examples; everything makes sense. But there's one
2010 Mar 18
1
[LLVMdev] Turning sub-target features on/off (e.g. Altivec on PowerPC)
Hello, I'm using Mono with experimental LLVM backend support on PowerPC. I noticed that although LLVM's IR contains SIMD instructions the assembly produced doesn't contain any Altivec instructions and my PowerPC970 machine of course has Altivec support. Isn't there some kind of autodetection? I searched in Target sources but only found out that Altivec is disabled by default. Can
2010 Aug 27
0
[LLVMdev] What does this error mean: psuedo instructions should be removed before code emission?
On 08/27/2010 11:05, Dale Johannesen wrote: >>>> Function only has on BB. Is this wrong that it has both >>>> TCRETURNri64 and RET in one BB? >>> >>> Yes, that is wrong. The reason emitEpilogue isn't lowering the >>> TCRETURN is that it doesn't see it, it only sees the RET. The real >>> problem will be where that RET is
2009 Jan 28
1
[LLVMdev] Newbie question: Getting info about JIT-compiled function
Andrew Haley wrote: > Jeff Kuskin wrote: > > Apologies if this is a FAQ. > > > > I am using the LLVM JIT facility on an x86_64 platform. I generate > > IR for a single function using IRBuilder(), use the > > FunctionPassManager to do some optimization passes, and then call > > ExecutionEngine::getPointerToFunction() to get a native-code version > > of
2010 Aug 27
2
[LLVMdev] What does this error mean: psuedo instructions should be removed before code emission?
On 08/27/2010 11:32, Yuri wrote: > As I understand only one of TCRETURNri64 and RET should be created. > I have sources of rev.112200. > > Here is the stack when TCRETURNri64 instruction is created: > #1 0x0000000802c8b4e2 in llvm::MachineFunction::CreateMachineInstr > (this=0x30eb000, TID=@0x803a78940, DL={LineCol = 0, ScopeIdx = 0}, > NoImp=false) at
2010 Mar 18
1
[LLVMdev] Turning on/off sub-target features (e.g. Altivec on PowerPC)
Hello, I'm using Mono with experimental LLVM backend support on PowerPC. I noticed that although LLVM's IR contains SIMD instructions the assembly produced doesn't contain any Altivec instructions and my PowerPC970 machine of course has Altivec support. Isn't there some kind of autodetection? I searched in Target sources but only found out that Altivec is disabled by default. Can
2007 Jul 15
2
[LLVMdev] JIT Leaks?
First, I'm not sure if deleting the ExecutionEngine is all I need to clean-up... so I started with a minimal test just to check int main( int argc, char **argv ){ while( true ){ Module *M = new Module("M"); Function *F = cast<Function>(M->getOrInsertFunction("F", Type::Int32Ty, (Type*)0)); BasicBlock *BB = new
2007 Jul 15
0
[LLVMdev] JIT Leaks?
On Sun, 15 Jul 2007, Paolo Invernizzi wrote: > First, I'm not sure if deleting the ExecutionEngine is all I need to > clean-up... so I started with a minimal test just to check Is this llvm 2.0 or llvm svn head? Several minor memory leaks have been fixed since llvm 2.0. -Chris > int main( int argc, char **argv ){ > while( true ){ > Module *M = new
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
2009 Mar 17
0
[LLVMdev] Printing x86 ASM for Function
Dear Maxime, Nyx wrote: > Hello, > > I would like to know how to go about printing the x86 assembly output for a > compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter > on doxygen. However, it takes several arguments I don't know how to fill in. > Is there a helper function to create such a pass? Once I have the pass > created, do I just add it
2009 Jan 27
1
[LLVMdev] Newbie question: Getting info about JIT-compiled function
Apologies if this is a FAQ. I am using the LLVM JIT facility on an x86_64 platform. I generate IR for a single function using IRBuilder(), use the FunctionPassManager to do some optimization passes, and then call ExecutionEngine::getPointerToFunction() to get a native-code version of the function. Everything works fine so far. Two questions: Question (1): How can I get the size of the native
2012 Aug 06
2
[LLVMdev] Code-emission problem
Hi Everyone, When I compile a program with clang with debug symbols enabled and I try to run it using the JIT (lli) I get the following error message. I am running on Lion (10.7.4). Thanks. George >> pseudo instructions should be removed before code emission UNREACHABLE executed at /Users/JD/Software/llvm3.1/llvm-3.1.src/lib/Target/X86/X86CodeEmitter.cpp:736! 0 lli
2009 Jul 21
0
[LLVMdev] Handling of built-in functions
If you add an ASM node, you won't be able to JIT the result. I don't know if you care about that or not, but ASM nodes aren't supported by the execution engine. (If you do want to JIT, you could always dump the machine code to memory and link its location to a global using ExecutionEngine::addGlobalMapping), and then JIT whatever needs to call it. Obviously, it won't get inlined
2008 Feb 28
1
[LLVMdev] Are multiple execution engines allowed?
I'm trying to set up some automated testing, and I'd like to have multiple instances of ExecutionEngines, so that the state from the first test doesn't alter the second state. Right now I'm doing something along the lines of: Module *emptyModule = new Module("emptyModule"); ExecutionEngine executionEngine = ExecutionEngine::create(emptyModule);
2012 Feb 20
1
[LLVMdev] ARM opcode format
Hello, So the current JIT will be superseded by the MCJIT completely and no further development should be expected for the current JIT? In any case, I am definitely interested in submitting a patch if you could help me by sending me in the right direction, since I really want this working. I managed to reproduce this behavior in LLVM 3.0 by modifying llc to read my .bc file and try to JIT the
2009 Mar 16
2
[LLVMdev] Printing x86 ASM for Function
Hello, I would like to know how to go about printing the x86 assembly output for a compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter on doxygen. However, it takes several arguments I don't know how to fill in. Is there a helper function to create such a pass? Once I have the pass created, do I just add it to a FunctionPassManager? Thank you for your time, -
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
I am new to llvm so I might be missing a critical step. My system is Fedora 12 but this also happens in Mac OS X 10.6.2. Here are the steps I used to compile llvm: export TARGETS=x86,x86_64,cpp export INSTALLDIR=/home/rovitotv/llvm ../llvm-2.6/configure --prefix=$INSTALLDIR --enable-bindings=none --enable-targets=$TARGETS --enable-optimized --with-llvmgccdir=$INSTALLDIR
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