<div dir="ltr">Hi,<div><br></div><div>depending on your specific use case you could have a look at the Sulong project (<a href="https://github.com/graalvm/sulong/">https://github.com/graalvm/sulong/</a>). Sulong can execute LLVM IR programs and gathers profiling information during the program's execution. For example, Sulong profiles the frequency of successor blocks in the interpreter, to then communicate it to the dynamic compiler for better optimization [1]. Similarly, you could implement a node that counts the number of executed instructions between two points in the program and instantiate it in the parser [2].</div><div><br></div><div>- Manuel</div><div><br></div><div>[1] <a href="https://github.com/graalvm/sulong/blob/master/projects/com.oracle.truffle.llvm.nodes.impl/src/com/oracle/truffle/llvm/nodes/impl/base/LLVMBasicBlockNode.java">https://github.com/graalvm/sulong/blob/master/projects/com.oracle.truffle.llvm.nodes.impl/src/com/oracle/truffle/llvm/nodes/impl/base/LLVMBasicBlockNode.java</a></div><div>[2] <a href="https://github.com/graalvm/sulong/blob/master/projects/com.oracle.truffle.llvm.parser.impl/src/com/oracle/truffle/llvm/parser/impl/LLVMVisitor.java">https://github.com/graalvm/sulong/blob/master/projects/com.oracle.truffle.llvm.parser.impl/src/com/oracle/truffle/llvm/parser/impl/LLVMVisitor.java</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-13 16:35 GMT+02:00 fateme Hoseini via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi<div>Does LLVM dynamically run the program to obtain profiling information like branch weight? if so, can we access the information regarding this run like the number of instructions that have been executed dynamically between two specific points of the program?</div><div><br></div><div>Thanks</div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>