Hi all,<div><br></div><div>I have implemented a GC plugin and i want to exclude Tail-call instructions from being considered as Safe Points. For that reason I have overwritten the "findCustomSafePoints" function with something like that:</div>
<div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div> bool ErlangGC::findCustomSafePoints(GCFunctionInfo &FI, MachineFunction &MF) {</div><div>   for (MachineFunction::iterator BBI = MF.begin(),</div>
<div>                                              BBE = MF.end(); BBI != BBE; ++BBI)</div><div>     for (MachineBasicBlock::iterator MI = BBI->begin(),</div><div>                                                    ME = BBI->end(); MI != ME; ++MI)</div>
<div>       if (MI->getDesc().isCall() && !isTailCall(MI))</div><div><span class="Apple-tab-span" style="white-space:pre">   </span> VisitCallPoint(FI, MI);</div><div><br></div><div>  return false;</div><div>}</div>
<div><br></div></blockquote>using Nicolas' patch [1] and his code in VMkit as a template [2].<div><br></div><div>My problem is that I am not sure how i should define the "isTailCall" function in order to be target-independent. Any advice is welcome!</div>
<div><br></div><div><br></div><div>Thank you in advance,</div><div>Yiannis</div><div><br></div><div><br></div><div>[1]: <a href="https://groups.google.com/group/llvm-dev/browse_thread/thread/c866ef40b31504cb/46ab6820f20aba38?show_docid=46ab6820f20aba38&pli=1">https://groups.google.com/group/llvm-dev/browse_thread/thread/c866ef40b31504cb/46ab6820f20aba38?show_docid=46ab6820f20aba38&pli=1</a></div>
<div>[2]: <a href="http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/vmkit/StaticGCPrinter/VmkitGCPrinter.cpp?view=markup">http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/vmkit/StaticGCPrinter/VmkitGCPrinter.cpp?view=markup</a></div>