Ah ok. Sorry. :)<br><br>I think that argument "-femit-all-decls" will help you.<br><br>Olivier.<br><br><div class="gmail_quote">On Mon, Dec 14, 2009 at 9:18 PM, Arvind Sudarsanam <span dir="ltr"><<a href="mailto:arvind.sudarsanam@aggiemail.usu.edu">arvind.sudarsanam@aggiemail.usu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
Sorry for not being specific. I just wanted to know if there is any<br>
way at all to force clang to generate intermediate code for static<br>
functions when they are not being called anywhere inside the current<br>
module. Other compilers seem to generate intermediate code (lcc, for<br>
instance).<br>
<br>
Thanks for your reply..Olivier.<br>
<br>
Sincerely<br>
<font color="#888888">Arvind<br>
</font><div><div></div><div class="h5"><br>
On Mon, Dec 14, 2009 at 1:10 PM, Olivier Meurant<br>
<<a href="mailto:meurant.olivier@gmail.com">meurant.olivier@gmail.com</a>> wrote:<br>
> Hi Arvind,<br>
><br>
> you need to use it effectively :<br>
><br>
><br>
> static int add(int a, int b) {<br>
>         return a+b;<br>
> }<br>
> int use() {<br>
>         return add(4,5);<br>
> }<br>
><br>
> ==><br>
><br>
> ; ModuleID = '<stdin>'<br>
> target datalayout =<br>
> "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"<br>
> target triple = "i386-pc-linux-gnu"<br>
><br>
> define i32 @use() nounwind {<br>
> [...]<br>
> }<br>
><br>
> define internal i32 @add(i32 %a, i32 %b) nounwind {<br>
> [...]<br>
> }<br>
><br>
> Olivier.<br>
><br>
><br>
> On Mon, Dec 14, 2009 at 8:49 PM, Arvind Sudarsanam<br>
> <<a href="mailto:arvind.sudarsanam@aggiemail.usu.edu">arvind.sudarsanam@aggiemail.usu.edu</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I am trying to compile a single module (dgemm.c) using clang and<br>
>> generate dgemm.ll.<br>
>> Command: clang -emit-llvm dgemm.c -S -o dgemm.ll<br>
>> Some of the functions are declared as static and clang ignores these<br>
>> functions:<br>
>><br>
>> One of the functions is:<br>
>> static void innerloop(double a, const double* b, double* c, double beta)<br>
>> {<br>
>>  *b = a*beta;<br>
>>   return;<br>
>> }<br>
>><br>
>> Is there any way to make clang generate llvm code for the static<br>
>> functions?<br>
>><br>
>> Thanks<br>
>> Sincerely<br>
>> Arvind<br>
>><br>
>> --<br>
>> Arvind Sudarsanam<br>
>> Utah State University<br>
>> Phone: (435) 512-7769<br>
>> E-mail: <a href="mailto:theonemorpheus@gmail.com">theonemorpheus@gmail.com</a><br>
>> Web-site: <a href="http://cc.usu.edu/%7Easudarsanam" target="_blank">http://cc.usu.edu/~asudarsanam</a><br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Arvind Sudarsanam<br>
Utah State University<br>
Phone: (435) 512-7769<br>
E-mail: <a href="mailto:theonemorpheus@gmail.com">theonemorpheus@gmail.com</a><br>
Web-site: <a href="http://cc.usu.edu/%7Easudarsanam" target="_blank">http://cc.usu.edu/~asudarsanam</a><br>
</div></div></blockquote></div><br>