<DIV>
<DIV><FONT size=2>
<P>Hi ,</P>
<P>I am using LLVM for my Post Graduate course project on Optimization. I am trying to do some insrtumentation to the bytecode.I 've been going through your Instrumentation code for the past few days in /llvm/lib/Transforms/Instrumentation folder and finally found two ways of instrumentation :</P>
<P>1) injecting LLVM bytecode instructions</P>
<P>2) calling an external C function.</P>
<P>I am trying both and I am comfortable with the 2).<BR>My goal is to insert a global variable , which will count the total number of functions executed.At each method entry the global variable should be incremented and at the last method exit , it should print the count. The code compiled successfully, but when I used in the opt tool, I get an error in the getElementPtr(..) statement and finally a segmentation fault error. Please help me regarding this.</P>
<P>I am sending the code as an attachment.</P>
<P>I 've written a pass which will do instrumentation using the opt tool and then execute with lli JIT enabled.</P>
<P>Thank you ,</P>
<P>Sandra Johnson , M.E. (C.S.E.)</P>
<P>Anna University,</P>
<P>Chennai , India.</P></FONT></DIV></DIV><p>
                <hr size=1> <a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/">Yahoo! Music Unlimited - Access over 1 million songs. Try it free.</a>