search for: runfunctionasmain

Displaying 20 results from an estimated 77 matches for "runfunctionasmain".

2019 Jan 26
2
How to pass arbitrary arguments to runFunctionAsMain?
...; Function " << main->getName().str() << "\n"; std::vector<std::string> parameters; parameters.insert(parameters.begin(), "argv"); const char* const* envp; for (int i=1; i<argc;i++) parameters.push_back(argv[i]); v->runFunctionAsMain(main, parameters, envp); Is it correct or should I construct parameters in another way? Thanks a lot Alberto -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190126/045eaff0/attachment.html>
2013 Oct 08
2
[LLVMdev] What makes register allocation expensive?
...; it prints "hello, world" and counts from 1 to 10, so it is about a dozen lines long and refers to maybe five hundred lines of library code. All times are in milliseconds, and the total includes both compilation and program execution. llvm-3.1: 2722 total 2342 llvm::ExecutionEngine::runFunctionAsMain 1144 SelectionDAGIsel::runOnMachineFunction 294 RegisterCoalescer::runOnMachineFunction 116 RAGreedy::runOnMachineFunction llvm-3.3: 53683 total 52661 llvm::ExecutionEngine::runFunctionAsMain 16955 RAGreedy::runOnMachineFunction 15149 RegisterCoalescer::runOnMachineFunction 15072 SelectionDA...
2013 Oct 08
0
[LLVMdev] What makes register allocation expensive?
...; it prints "hello, world" and counts from 1 to 10, so it is about a dozen lines long and refers to maybe five hundred lines of library code. All times are in milliseconds, and the total includes both compilation and program execution. llvm-3.1: 2722 total 2342 llvm::ExecutionEngine::runFunctionAsMain 1144 SelectionDAGIsel::runOnMachineFunction 294 RegisterCoalescer::runOnMachineFunction 116 RAGreedy::runOnMachineFunction llvm-3.3: 53683 total 52661 llvm::ExecutionEngine::runFunctionAsMain 16955 RAGreedy::runOnMachineFunction 15149 RegisterCoalescer::runOnMachineFunction 15072 SelectionDA...
2005 Jan 08
0
[LLVMdev] Primer with LLVM
...ry point (¿main?) > (7) Execute it llvm/tools/lli/lli.cpp -> Function *Fn = MP->getModule()->getMainFunction(); if (!Fn) { std::cerr << "'main' function not found in module.\n"; return -1; } // Run main... int Result = EE->runFunctionAsMain(Fn, InputArgv, envp); See llvm/lib/ExecutionEngine/ExecutionEngine.cpp for runFunctionAsMain() -- Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu
2014 Mar 31
2
[LLVMdev] Which function executing VMKit's llvm-IR
...ce java byte codes compiled in to llvm IR it will be passed to VMKit for store them . I couldn't find out which function is getting this Jitted output from *Functioncache* and executing them ? because , VMKit doesn't have an implementation of llvm Executionengine's *runFunction* or *runFunctionAsMain* implementation which are responsible for executing Jitted llvm-IR ? Thanks Regards Sri. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140331/18a82812/attachment.html>
2005 Jan 08
3
[LLVMdev] Primer with LLVM
> >>> Would be great if we append into the documentation several "patters" > >>> to show how perform with LLVM. It would accelerate the learn curve for > >>> beginners like me, avoiding basic errors and mistakes. If I reach a > >>> good level with LLVM I can make these. > >> > >> I'm not sure if I understand what you
2018 Jun 14
3
runStaticConstructorsDestructors() causes crash on exit
Greetings, LLVM wizards. I am using clang to compile a C++ module, and an ExecutionEngine (MCJIT) to execute a function it defines. That works (or pretends to). However, if I call the module's constructors first: exec_engine->runStaticConstructorsDestructors(false); exec_engine->runFunctionAsMain(function, argvec, NULL); execution still works, but my program crashes when it exits, in __run_exit_handlers(). I can't tell from gdb what exit handler is crashing, but no calls are made to atexit() or on_exit(); all exit handlers are installed via __cxa_atexit(). This may or may not be meani...
2008 Oct 30
3
[LLVMdev] Problem executing code with lli...
...erpreter, void>::visit(llvm::Instruction&)+0x1fe)[0x4b648e] lli(llvm::Interpreter::run()+0x2b)[0x4b179b] lli(llvm::Interpreter::runFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&)+0xac)[0x4b490c] lli(llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, char const* const*)+0xa5)[0x4bf295] lli(main+0x1...
2012 Aug 06
2
[LLVMdev] Code-emission problem
...b7 llvm::JIT::getPointerToFunction(llvm::Function*) + 695 16 lli 0x0000000102eb9bfb llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&) + 171 17 lli 0x00000001032a39f6 llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::string, std::allocator<std::string> > const&, char const* const*) + 1126 18 lli 0x0000000102a7a123 main + 2915 19 lli 0x0000000102a79534 start + 52 Stack dump: 0. Program arguments: lli test.bc 1. Running pass 'X86 Ma...
2019 Jan 26
2
How to debug .ll file with segmentation fault?
...#6 0x00007f1628ff648e #7 0x00007f1628e37bc0 #8 0x00007f1628ff63a4 #9 0x00007f1628fc89e5 #10 0x00007f162c3cd79d llvm::MCJIT::runFunction(llvm::Function*, llvm::ArrayRef<llvm::GenericValue>) (/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x19fd79d) #11 0x00007f162c3a67f7 llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, char const* const*) (/usr/lib/...
2010 Jun 01
2
[LLVMdev] Assertion when loading bitcode
...&) + 44 14 lli 0x00307a40 llvm::JIT::getPointerToFunction(llvm::Function*) + 452 15 lli 0x00308d34 llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&) + 68 16 lli 0x00322330 llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::string, std::allocator<std::string> > const&, char const* const*) + 364 17 lli 0x000ebaf8 main + 1488 18 libc.so.6 0x401fbfd4 __libc_start_main + 288 Stack dump: 0. Program arguments: /arm-linux-2.7/bin/lli -march=arm /twofunctions.bc 1. Ru...
2004 Oct 27
2
[LLVMdev] Getting started with GC
.... Running linked.bc outputs Garbage collecting!! process_root[0x0xbffff3f0] = 0x0x41257008 process_root[0x0xbffff3ec] = 0x0x41257012 lli((anonymous namespace)::PrintStackTrace()+0x1a)[0x857f236] lli((anonymous namespace)::SignalHandler(int)+0xcb)[0x857f4a9] [0xffffe420] lli(llvm::ExecutionEngine::runFunctionAsMain... Which is too be expected since llvm_gc_collect in llvm/runtime/GC/SemiSpace/semispace.c ends with abort(); I believe we have our work cut out for us. Hopefully you'll have a working GC by Christmas time. Tom -- 28 70 20 71 2C 65 29 61 9C B1 36 3D D4 69 CE 62 4A 22 8B 0E DC 3E mailto:t...
2009 Mar 09
0
[LLVMdev] Cross-Module Function Calls
...tionEngine *engine; engine = llvm::ExecutionEngine::create( foo_provider ); engine->addModuleProvider( bar_provider ); std::vector<std::string> args; args.push_back( "foo.ll" ); llvm::Function *fn_main = engine->FindFunctionNamed( "main" ); int rv = engine->runFunctionAsMain( fn_main, args, environ ); return rv; } //// #### Makefile AS=/home/terrence/programming/OSS-rcs/llvm/Debug/bin/llvm-as LD=/home/terrence/programming/OSS-rcs/llvm/Debug/bin/llvm-ld CC=g++ LLVM_CONFIG=/home/terrence/programming/OSS-rcs/llvm/Debug/bin/llvm-config LLVM_CXXFLAGS=`${LLVM_CONFIG} --cxx...
2011 Jan 15
2
[LLVMdev] LLVM GC
...33e8cde llvm::JIT::getPointerToFunction(llvm::Function*) + 606 13 libLLVM-2.8.so 0x0000003cc33ea253 llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&) + 67 14 libLLVM-2.8.so 0x0000003cc336ad4a llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::string, std::allocator<std::string> > const&, char const* const*) + 1130 15 lli 0x0000000000404cd6 main + 2054 16 libc.so.6 0x0000003cc1c1ec5d __libc_start_main + 253 17 lli 0x0000000000403689 Stack dump: 0. Program arg...
2009 Oct 31
3
[LLVMdev] Something wrong with my libpthread.so
...a073 llvm::JIT::getPointerToFunction(llvm::Function*) + 421 11 lli 0x0000000000c68ae6 llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&) + 120 12 lli 0x0000000000c91b25 llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::string, std::allocator<std::string> > const&, char const* const*) + 1091 13 lli 0x00000000008448ea main + 1841 14 libc.so.6 0x0000003df281ea2d __libc_start_main + 253 15 lli 0x0000000000843fd9 Does it mean that the...
2018 Jun 19
2
runStaticConstructorsDestructors() causes crash on exit
...using clang to compile a C++ module, and an ExecutionEngine (MCJIT) > to execute a function it defines. That works (or pretends to). However, if > I call the module's constructors first: > > > > exec_engine->runStaticConstructorsDestructors(false); > > exec_engine->runFunctionAsMain(function, argvec, NULL); > > > > execution still works, but my program crashes when it exits, in > __run_exit_handlers(). I can't tell from gdb what exit handler is crashing, > but no calls are made to atexit() or on_exit(); all exit handlers are > installed via __cxa_atexi...
2019 Jan 26
3
How to debug .ll file with segmentation fault?
...7f1628ff63a4 >> #9 0x00007f1628fc89e5 >> #10 0x00007f162c3cd79d llvm::MCJIT::runFunction(llvm::Function*, >> llvm::ArrayRef<llvm::GenericValue>) >> (/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x19fd79d) >> #11 0x00007f162c3a67f7 >> llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, >> std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, >> std::allocator<char> >, >> std::allocator<std::__cxx11::basic_string<char, >> std::char_traits<char>, std::allocator<char> > > > const&...
2020 Jan 06
2
clang interpreter failed to materialize symbols
...B18DB88 0x000001AF8A583F18 0x000000575B18DBC0), llvm::MCJIT::runFunction() + 0x480 bytes(s), C:\dev\llvm-project\llvm\lib\ExecutionEngine\MCJIT\MCJIT.cpp, line 550 + 0x16 byte(s) 0x00007FF68EC09680 (0x000001AF8A563310 0x000001AF8A583F18 0x00007FF6920964A0 0x000001AF8A532460), llvm::ExecutionEngine::runFunctionAsMain() + 0x410 bytes(s), C:\dev\llvm-project\llvm\lib\ExecutionEngine\ExecutionEngine.cpp, line 470 + 0x65 byte(s) 0x00007FF68DEE4200 (0x0000000000000002 0x000001AF8A5515B0 0x000001AF8A532460 0x00007FF6909C0A7D), main() + 0x1D10 bytes(s), C:\dev\llvm-project\llvm\tools\lli\lli.cpp, line 614 + 0x4D byte(...
2004 Oct 26
2
[LLVMdev] Getting started with GC
...JITOnFunction(llvm::Function*)+0x4f)[0x8312da7] lli(llvm::JIT::getPointerToFunction(llvm::Function*)+0x15f)[0x8312f59] lli(llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&)+0x4e)[0x8311fc0] lli(llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, char const* const*)+0x2ef)[0x8369619] lli(main+0...
2011 Jan 15
2
[LLVMdev] Fw: LLVM GC
...606 > > 13 libLLVM-2.8.so 0x0000003cc33ea253 > > llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue, > > std::allocator<llvm::GenericValue> > const&) + 67 > > 14 libLLVM-2.8.so 0x0000003cc336ad4a > > llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, > > std::vector<std::string, std::allocator<std::string> > const&, char > > const* const*) + 1130 > > 15 lli 0x0000000000404cd6 main + 2054 > > 16 libc.so.6 0x0000003cc1c1ec5d __libc_start_main + 253 > > 17 lli...