search for: foof

Displaying 20 results from an estimated 28 matches for "foof".

Did you mean: foo
2008 Aug 19
7
[LLVMdev] Please help with LLVM C++ integration
...sh_back(Type::Int32Ty); FunctionType * func_type = FunctionType::get(Type::Int32Ty, func_args, false); Function * my_function = Function::Create( func_type, Function::ExternalLinkage, "some_test_func", M ); EE->addGlobalMapping( my_function, (void*)&some_test_func ); Function *FooF = cast<Function>(M->getOrInsertFunction("foo", Type::Int32Ty, (Type *)0)); BasicBlock * BB = BasicBlock::Create("EntryBlock", FooF); Value *Ten = ConstantInt::get(Type::Int32Ty, 10); CallInst *Add1CallRes = CallInst::Create(my_function, Ten, "some_test_func&quot...
2004 Aug 10
0
[LLVMdev] API on JIT, code snippets
.../usr/local/lib/scalaropts.o -lanalysis -ltransformutils /usr/local/lib/bcreader.o /usr/local/lib/vmcore.o /usr/local/lib/support.o -ltarget -export-dynamic -ldl (don't ask me why some modules are left as .o) Well. Compiled. Tested. Infinite loop in: GenericValue gv = EE->runFunction(FooF, noargs); you were really, really close, Reid, just a one mistake: < CallInst * Add1CallRes = new CallInst(FooF, Params, "foo", BB); > CallInst * Add1CallRes = new CallInst(Add1F, Params, "add1", BB); :-P > There is only one remaining item that I don't know ho...
2009 Mar 20
2
[LLVMdev] Possible memory leakage in the LLVM JIT Engine
...(hopefully) demonstrates the possible leakage. My suspicion is that freeMachineCodeForFunction does not do its job properly. Let us look at HowToUseJIT.cpp example that comes with LLVM source bundle and let us modify the last lines in the following way: for (;;) { gv = EE->runFunction(FooF, noargs); // Import result of execution: outs() << "Result: " << gv.IntVal << "\n"; } Everithing works fine. However if we do the following modification: for (;;) { gv = EE->runFunction(FooF, noargs); // Import result of execution:...
2004 Aug 09
5
[LLVMdev] API on JIT, code snippets
...= > FunctionType::get(Type::IntTy, // result has type: 'int ()' > std::vector<const Type*>(), // no arguments > /*not vararg*/false); > > // create the entry for function `foo' and insert > // this entry into module M: > Function *FooF = > new Function(FooT, > Function::ExternalLinkage, // too wide? > "foo", M); > > // Add a basic block to the FooF function... > BasicBlock *BB = new BasicBlock("EntryBlock of add1 function", FooF); > > // Get pointers...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
...= FunctionType::get(Type::Int32Ty, > func_args, false); > Function * my_function = Function::Create( func_type, > Function::ExternalLinkage, "some_test_func", M ); > EE->addGlobalMapping( my_function, (void*)&some_test_func ); > > Function *FooF = cast<Function>(M->getOrInsertFunction("foo", > Type::Int32Ty, (Type *)0)); > BasicBlock * BB = BasicBlock::Create("EntryBlock", FooF); > Value *Ten = ConstantInt::get(Type::Int32Ty, 10); > CallInst *Add1CallRes = CallInst::Create(my...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
...type = FunctionType::get(Type::Int32Ty, func_args, false); > Function * my_function = Function::Create( func_type, > Function::ExternalLinkage, "some_test_func", M ); > EE->addGlobalMapping( my_function, (void*)&some_test_func ); > > Function *FooF = cast<Function>(M->getOrInsertFunction("foo", > Type::Int32Ty, (Type *)0)); > BasicBlock * BB = BasicBlock::Create("EntryBlock", FooF); > Value *Ten = ConstantInt::get(Type::Int32Ty, 10); > CallInst *Add1CallRes = CallInst::Create(my...
2004 Aug 10
1
[LLVMdev] API on JIT, code snippets
...ltransformutils > /usr/local/lib/bcreader.o /usr/local/lib/vmcore.o > /usr/local/lib/support.o -ltarget -export-dynamic -ldl > > (don't ask me why some modules are left as .o) > > Well. Compiled. Tested. Infinite loop in: > > GenericValue gv = EE->runFunction(FooF, noargs); > > you were really, really close, Reid, just a one mistake: > > < CallInst * Add1CallRes = new CallInst(FooF, Params, "foo", BB); > > > CallInst * Add1CallRes = new CallInst(Add1F, Params, "add1", BB); > > :-P > >> There is...
2009 Mar 22
0
[LLVMdev] Possible memory leakage in the LLVM JIT Engine
...kage. My suspicion is that freeMachineCodeForFunction does not do > its job properly. > > Let us look at HowToUseJIT.cpp example that comes with LLVM source > bundle and let us modify the last lines in the following way: > > for (;;) > { > gv = EE->runFunction(FooF, noargs); > // Import result of execution: > outs() << "Result: " << gv.IntVal << "\n"; > } > > Everithing works fine. However if we do the following modification: > > for (;;) > { > gv = EE->runFunction(FooF, noa...
2004 Aug 09
1
[LLVMdev] API on JIT, code snippets
...= > FunctionType::get(Type::IntTy, // result has type: 'int ()' > std::vector<const Type*>(), // no arguments > /*not vararg*/false); > > // create the entry for function `foo' and insert > // this entry into module M: > Function *FooF = > new Function(FooT, > Function::ExternalLinkage, // too wide? > "foo", M); > > // Add a basic block to the FooF function... > BasicBlock *BB = new BasicBlock("EntryBlock of add1 function", FooF); > > // Get pointers...
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
...e::get(Type::IntTy, // result has type: 'int ()' > > std::vector<const Type*>(), // no arguments > > /*not vararg*/false); > > > > // create the entry for function `foo' and insert > > // this entry into module M: > > Function *FooF = > > new Function(FooT, > > Function::ExternalLinkage, // too wide? > > "foo", M); > > > > // Add a basic block to the FooF function... > > BasicBlock *BB = new BasicBlock("EntryBlock of add1 function", FooF); > &gt...
2004 Aug 13
3
[LLVMdev] is this code really JITed and/or optimized ? ..
...LVM function: /////////////////////////// ExistingModuleProvider* MP = new ExistingModuleProvider(M); ExecutionEngine* EE = ExecutionEngine::create( MP, true ); // Call the `foo' function with no arguments: std::vector<GenericValue> noargs; GenericValue gv = EE->runFunction(FooF, noargs); /////////////////////////// for LLVM developers no debuging should be needed to make quick and right diagnosis :) -- Valery
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
Reid wrote: > I have to agree with Misha on this. None of us knows "everything" about > LLVM and as you can see, Misha responded three hours before I did :). > Asking questions here is encouraged, so please feel free to post them on > LLVMdev. We'll always help where we can. well, OK :) Please find the attachment with the first approach to such an example i've
2004 Aug 09
3
[LLVMdev] API on JIT, code snippets
Valery, I have to agree with Misha on this. None of us knows "everything" about LLVM and as you can see, Misha responded three hours before I did :). Asking questions here is encouraged, so please feel free to post them on LLVMdev. We'll always help where we can. Thanks, Reid. On Mon, 2004-08-09 at 06:37, Misha Brukman wrote: > On Mon, Aug 09, 2004 at 12:32:33PM +0400, Valery
2020 Feb 24
2
segfault with HowToUseJIT
...M module: ; ModuleID = 'test' source_filename = "test" Running foo: Segmentation fault (core dumped) Running it through GDB: Program received signal SIGSEGV, Segmentation fault. 0x0000000000404912 in main () at HowToUseJIT.cc:131 131      GenericValue gv = EE->runFunction(FooF, noargs); (gdb) bt #0  0x0000000000404912 in main () at HowToUseJIT.cc:131 It seems it fails when the JIT-compiled function gets called. I freshly downloaded LLVM 9.0.1 and build it with the backend "X86". The machine I am running this on is a 'Intel(R) Core(TM) i7-6820HQ CPU @...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
On Aug 19, 2008, at 13:36, kirill havok wrote: > I got very interested in LLVM project, and I decided to start > writing my own scripting language based on it. By studying the > documentation, I could not find how to call external function, > written in C. That is, I have a set of functions written in C/C++, I > generate code, using LLVM C++ interface, how can I call(or
2000 Oct 24
1
Perl modules
As promised, I've written vorbis Perl modules (separated into an Ogg Vorbis module and an ao module). You can get tarballs and .debs at http://eyeofdog.org/foof/code/vorbis/ Ogg::Vorbis is an object oriented module based around OggVorbis_File. Ogg::Vorbis::Info is an accessor class to the vorbis_info struct. Comments are retrieved as a simple hash. Since this is based around libvorbisfile it can't write/encode files yet. Includes pogg (Perl ogg), a...
2004 Aug 13
0
[LLVMdev] is this code really JITed and/or optimized ? ..
...ModuleProvider(M); > ExecutionEngine* EE = ExecutionEngine::create( MP, true ); As Reid pointed out, changing true to false will get it to work. > // Call the `foo' function with no arguments: > std::vector<GenericValue> noargs; > GenericValue gv = EE->runFunction(FooF, noargs); > /////////////////////////// > > for LLVM developers no debuging should be needed to make > quick and right diagnosis :) Sure, but part of our goal is to get you to learn more about how stuff works too :) -Chris -- http://llvm.org/ http://nondot.org/sabre/
2008 Aug 19
5
[LLVMdev] Please help with LLVM C++ integration
Hello, I got very interested in LLVM project, and I decided to start writing my own scripting language based on it. By studying the documentation, I could not find how to call external function, written in C. That is, I have a set of functions written in C/C++, I generate code, using LLVM C++ interface, how can I call(or register in machine in run-time) my external functions? Maybe I just missed
2004 Aug 14
2
[LLVMdev] is this code really JITed and/or optimized? ..
...to work. as I've posted already, I got Segmentation Fault. Now, i have re-compiled LLVM with debug support. The evaluation is broken at line 78 in file: lib/ExecutionEngine/JIT/JIT.cpp The assertion assert(ArgValues.size() == 1); fails. But what's wrong? My function has type int FooF(void); so ArgValues should have size 0, right? BTW, the code of runFunction is quite unclear, indeed, for some reason cases ArgValues==3 and ArgValues==1 are specially considered... I looked in JIT.h for more description on interface -- quite ascetic info, nothing interesting. Anyway, few lines...
2001 Jul 07
2
Perl wrapper for libvorbisfile or stuff
Hey guys, I wrote to this list previously, saying I needed a perl module to do Ogg Vorbis tag reading / writing. People pretty much pointed me to the Ogg::Vorbis module that wrapped around libvorbisfile and I should extend that to writing streams, not only reading them. Well, awright, I thought, let's do it. Problem is, though: The download links on freshmeat are all broken and I don't