Hi all,<br><br>LLVM is built without debug enabled. Also i am not forcing lli to use interpreter mode. so i dont think the reason is not because of debug build or interpreter mode.<br><br><br><b>step 1: </b><br>compiled the 3 files (generic_replica.c ,xacc.c and dacc.c) with clang-cc to llvm bytecode files using -emit-llvm-bc and (-O0/-O3) options<br>
<b>step 2:</b><br>bytecode obtained from step 1 (generic_replica.bc, xacc.bc and dacc.bc) is passed to opt tool using (-O0/-O3) options<br><b>step 3:</b><br>optimized bytecode obtained from step 2 (generic_replica.opt.bc, xacc.opt.bc and dacc.opt.c) is combinde to a single bytecode file (monolith.bc) using llvm-ld tool<br>
<b>step 4: </b><br>running monolith.bc for 10000 iterations using lli tool and measured the time.<br><br>I also tried using llvm-gcc for emiting bytecode in step 1 but got almost the same output. As i have my entire setup in office i cant attach my makefile today. i will attach my entire setup tom once i get back to office. Also i will attach the configuration options i used for compiling LLVM. Let me know in case i am wrong anywhere.<br>
<br>Thanks & Regards,<br clear="all">Prasanth J<br><br><br><br>
<br><br><div class="gmail_quote">On Sun, Nov 15, 2009 at 3:40 AM, Evan Cheng <span dir="ltr"><<a href="mailto:evan.cheng@apple.com">evan.cheng@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
He is probably using the interpreter on a debug build.<br><font color="#888888">
<br>
Evan</font><div><div></div><div class="h5"><br>
<br>
On Nov 14, 2009, at 1:40 PM, Eric Christopher <<a href="mailto:echristo@apple.com" target="_blank">echristo@apple.com</a>> wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
for -O3 results refer attachment.<br>
time clang (-O0) llvm-gcc(-O0) gcc(-O0)<br>
real 0m10.247s 0m11.324s 0m10.963s<br>
user 0m2.644s 0m2.478s 0m2.263s<br>
sys 0m5.949s 0m6.000s 0m5.953s<br>
<br>
llvm-jit<br>
i used clang-cc -O0 -emit-llvm-bc to emit llvm bytecode and then passed it to opt tool and then linked all bytecode files to single bytecode using llvm-ld, i used lli tool to run this single bytecode file and noticed the following output<br>
real 6m33.786s<br>
user 5m12.612s<br>
sys 1m1.205s<br>
<br>
why is lli taking such a loooong time to execute this particular piece of code.??<br>
</blockquote>
<br>
Something's wrong on your machine or something. I did the same (but using llvm-gcc for the .ll files). Using a debug build of current ToT I got this:<br>
<br>
[ghostwheel:~/Desktop] echristo% time ~/builds/build-llvm-64bit/Debug/bin/lli foo.bc.bc<br>
0.210u 0.010s 0:00.22 100.0% 0+0k 0+0io 0pf+0w<br>
<br>
<br>
That's a 64-bit build, but you'll notice the time difference. That said I'm guessing that there's something missing since it takes no time to execute. Step by step directions on what you did might help.<br>
<br>
-eric<br></div></div><div class="im">
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></blockquote>
</blockquote></div><br>