<div dir="ltr">Hi,<div><br></div><div>I think it's called getOrInsertFunction() in module class, with reference from:</div><div><br></div><div><a href="http://llvm.org/releases/2.6/docs/tutorial/JITTutorial1.html">http://llvm.org/releases/2.6/docs/tutorial/JITTutorial1.html</a><br></div><div><br></div><div>Also, when you encounter questions for LLVM C++ APIs in the future, you can write desired output code and use llc to generate proper C++API code, which I think is a very neat feature of LLVM.</div><div><br></div><div>e.g.</div><div>clang -c -emit-llvm your_desired_output.c</div><div>llc -march=cpp your_desired_output.bc</div><div><br></div><div>Hope this helps.</div><div>Regards,</div><div>Kevin</div><div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 5, 2016 at 3:28 PM fateme Hoseini via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello everyone,<div>I am trying to add checkpoints to my IR code. In order to do that I need to add this instruction:</div><div>call void @m5_checkpoint(i64 0, i64 0)<br></div><div>to some of the basic blocks in my benchmark.<br></div><div>m5_checkpoint is a function defined for checkpointing in another simulator and is not included in my benchmark source code. So I need to create this instruction and I couldn't figure out how to do this by reading the manual. I will appreciate if anyone can help me .<br></div><div>Regards,</div><div>Fami</div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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>
</blockquote></div></div></div>