<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>fixing missing subject line in original email.</div><div><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2">----- Forwarded Message -----<br><b><span style="font-weight:bold;">From:</span></b> Ananth Durbha <avdurbha@yahoo.com><br><b><span style="font-weight: bold;">To:</span></b> llvm list <llvmdev@cs.uiuc.edu><br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, August 9, 2011 11:38 PM<br><b><span style="font-weight: bold;">Subject:</span></b> <br></font><br><div id="yiv478754071"><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt;"><div>Hi,</div><div> I am
interested in getting llvm IR only for a subset of the input source code - basically starting from a specified top level function, including all its callee functions (recursively).</div><div><br></div><div> For example, in the following code, I am interested in a command like "extract -top_function blah()" that will create an llvm IR with just blah() and foo().<br></div><div><br></div><div> int foo() {</div><div> ...<br></div><div> }</div><div><br></div><div> int blah() {</div><div> foo()</div><div>
}</div><div><br></div><div> int junk() {</div><div> blah();</div><div> }</div><div><br></div><div> int main() {</div><div> junk();</div><div> }</div><div><br></div><div> I can imagine writing some kind of FunctionPass that filters for specified function etc. But is there already some pass/command/tool that already does something similar?</div><div><br></div><div> Thanks in advance for helping a newbie!</div><div><br></div><div>-Ananth</div></div></div><br><br></div></div></div></body></html>