James,<br><br> Thanks. It wouldn't take the LTO option; however, I can get it to inline using -cppgen=inline.<br><br> However, when I run clang the second time it gives me an error, stating that it expects a top level entity. I think I've run into this issue before. Any ideas?<br>
<br><div class="gmail_quote">On Mon, Mar 12, 2012 at 11:30 AM, James Molloy <span dir="ltr"><<a href="mailto:James.Molloy@arm.com">James.Molloy@arm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Ryan,<br>
<br>
I see. Well, that shouldn't be an issue. If you link the bitcode files together with llvm-link you can then do several things:<br>
<br>
(1) Run clang on it as you normally would with -O3 for maximum inlining<br>
(2) Run 'llc' manually with -O3 and LTO, which will do the maximum link time optimisations.<br>
(3) Run 'opt' manually with -O3, LTO which will produce another bitcode file, which you can then again give to Clang to codegen.<br>
<div class="im"><br>
Cheers,<br>
<br>
James<br>
________________________________________<br>
From: Ryan Taylor [<a href="mailto:ryta1203@gmail.com">ryta1203@gmail.com</a>]<br>
</div>Sent: 12 March 2012 18:25<br>
<div class="im">To: James Molloy<br>
Cc: <a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a><br>
Subject: Re: [cfe-dev] Compiling Multiple Files<br>
<br>
</div><div class="im">James,<br>
<br>
  Sure. I want to inline functions in a C program that has no external node, or "main". So the "top" function is not main and there does not exist a main in the file.<br>
<br>
Thanks.<br>
<br>
</div><div class="im">On Mon, Mar 12, 2012 at 11:23 AM, James Molloy <<a href="mailto:James.Molloy@arm.com">James.Molloy@arm.com</a><mailto:<a href="mailto:James.Molloy@arm.com">James.Molloy@arm.com</a>>> wrote:<br>

Hi Ryan,<br>
<br>
</div><div class="im">> Do you know if it's possible to inline functions without an external node?<br>
<br>
Sorry, I don't know to what you're referring here. Could you please rephrase? what do you mean be "external node"?<br>
<br>
Cheers,<br>
<br>
James<br>
________________________________________<br>
</div>From: Ryan Taylor [<a href="mailto:ryta1203@gmail.com">ryta1203@gmail.com</a><mailto:<a href="mailto:ryta1203@gmail.com">ryta1203@gmail.com</a>>]<br>
<div class="im">Sent: 12 March 2012 17:58<br>
To: James Molloy<br>
</div>Cc: <a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a><mailto:<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>
<div class="im">Subject: Re: [cfe-dev] Compiling Multiple Files<br>
<br>
I believe it might actually. Do you know if it's possible to inline functions without an external node? It doesn't appear to be so.<br>
<br>
</div><div class="im">On Mon, Mar 12, 2012 at 1:24 AM, James Molloy <<a href="mailto:James.Molloy@arm.com">James.Molloy@arm.com</a><mailto:<a href="mailto:James.Molloy@arm.com">James.Molloy@arm.com</a>><mailto:<a href="mailto:James.Molloy@arm.com">James.Molloy@arm.com</a><mailto:<a href="mailto:James.Molloy@arm.com">James.Molloy@arm.com</a>>>> wrote:<br>

Hi Ryan,<br>
<br>
I would just compile to multiple IR files then link them together with llvm-link.<br>
<br>
Would that work for you?<br>
<br>
Cheers,<br>
<br>
James<br>
<br>
</div>From: <a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a><mailto:<a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a>><mailto:<a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a><mailto:<a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a>>> [mailto:<a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a><mailto:<a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a>><mailto:<a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a><mailto:<a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a>>>] On Behalf Of Ryan Taylor<br>

<div class="im">Sent: 09 March 2012 19:32<br>
</div>To: <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><mailto:<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a>><mailto:<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><mailto:<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a>>><br>

<div class="HOEnZb"><div class="h5">Subject: [cfe-dev] Compiling Multiple Files<br>
<br>
Clangers,<br>
<br>
 What's the best way to compile multiple files in one LLVM IR file? It doesn't appear that clang supports the gcc -combine feature.<br>
<br>
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.<br>

<br>
<br>
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.<br>

<br>
<br>
<br>
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.<br>

<br>
</div></div></blockquote></div><br>