<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><span style="font-family:tahoma,sans-serif">Hi John,<br><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
<span style="font-family:tahoma,sans-serif">I don't think its possible to add/insert an inline assembly into the LLVM IR unless the IR interface provides some kind of stream writer into which inline instructions can be written into.<br>
<br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><span style="font-family:tahoma,sans-serif">I was thinking having an LLVM intrinsic function could be a first step towards introducing PMU tool support in LLVM with which you can generate code with built-in instrumentation. What do you think ?<br>
<br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><span style="font-family:tahoma,sans-serif">Sathvik <br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
<span style="font-family:tahoma,sans-serif"><br> <br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><span style="font-family:tahoma,sans-serif"><br></span><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Jun 20, 2014 at 8:21 AM, John Criswell <span dir="ltr"><<a href="mailto:criswell@illinois.edu" target="_blank">criswell@illinois.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div class="">
<div>On 6/19/14, 7:12 PM, sathvik wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">I want
to measure the performance of a JITed code snippet on MCJIT. </div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
so I was planning to inject the RDPMC inst for the code
generated through a llvm IR builder. <br>
</div>
</div>
</blockquote>
<br></div>
I assume the easier way to do this is to add an inline assembly call
that uses the RDPMC instruction. I don't think there's an LLVM IR
intrinsic function that does it.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<blockquote type="cite"><div class="">
<div dir="ltr">
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br>
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Is there a patch available ? If there's a better way to do it
please chime in.</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br>
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Thanks</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">sathvik
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div><pre>_______________________________________________
LLVM Developers mailing list
<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>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>