Valery A.Khamenya
2004-Aug-13 22:39 UTC
[LLVMdev] is this code really JITed and/or optimized ? ..
> If it's that slow, you're probably getting the interpreter instead of the > JIT. Try adding -print-machineinstr to the command line, or -debug, and > see what happens. If you're not getting the JIT, try stepping through the > LLVM program to see where it makes the execution engine and decides which > one to use...(thanks for quick reply) hm, here is the part of my code starting LLVM 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
Chris Lattner
2004-Aug-13 22:53 UTC
[LLVMdev] is this code really JITed and/or optimized ? ..
On Sat, 14 Aug 2004, Valery A.Khamenya wrote:> hm, here is the part of my code starting LLVM function: > > /////////////////////////// > ExistingModuleProvider* MP = new ExistingModuleProvider(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/
Valery A.Khamenya
2004-Aug-13 23:06 UTC
[LLVMdev] is this code really JITed and/or optimized? ..
> > ExecutionEngine* EE = ExecutionEngine::create( MP, true ); > As Reid pointed out, changing true to false will get it to work.hm, well, "false" causes Segmentation fault.> > 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 :)LOL, i deleted few lines from my previous mail before send i.r.t. this your idea, which is well-known to me :) Actually my LLVM is compiled with no debug info. Newly compiled LLVM with debug support will be after ~45min :-/ -- V. local time 1:00am
Valery A.Khamenya
2004-Aug-14 13:07 UTC
[LLVMdev] is this code really JITed and/or optimized? ..
> > ExecutionEngine* EE = ExecutionEngine::create( MP, true ); > > As Reid pointed out, changing true to false will get it 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 of documentation could make life easier for other guys too. Thanks in advance, -- Valery.
Reasonably Related Threads
- [LLVMdev] is this code really JITed and/or optimized ? ..
- [LLVMdev] is this code really JITed and/or optimized? ..
- [LLVMdev] Please help with LLVM C++ integration
- [LLVMdev] Please help with LLVM C++ integration
- [LLVMdev] is this code really JITed and/or optimized ? ..