Displaying 3 results from an estimated 3 matches for "emitputs".
2012 Jun 18
0
[LLVMdev] Which pass converts call printf to puts?
...information. I got the pass in SimplifyLibCalls.cpp.
>
> I looked at the code, but am still a little confused about the IR
> instruction replacement model. Use the following specific optimization
> as example, it looks to me that even if a new call instruction (puts) is
> created in EmitPutS, but the returned one is still the original one
> (CI). So I am very curious about how the call instruction is replaced here.
>
> // printf("%s\n", str) --> puts(str)
> if (FormatStr == "%s\n" && CI->getNumArgOperands() > 1 &&
>...
2012 Jun 17
5
[LLVMdev] Which pass converts call printf to puts?
I found that LLVM optimized the IR by replacing printf with puts. I
wondered which pass did this optimization? And is it common that puts is
faster (and some other metric) than printf?
--
Thanks
Thomson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120617/08aa6c45/attachment.html>
2012 Jun 18
2
[LLVMdev] Which pass converts call printf to puts?
...ass in SimplifyLibCalls.cpp.
> >
> > I looked at the code, but am still a little confused about the IR
> > instruction replacement model. Use the following specific optimization
> > as example, it looks to me that even if a new call instruction (puts) is
> > created in EmitPutS, but the returned one is still the original one
> > (CI). So I am very curious about how the call instruction is replaced
> here.
> >
> > // printf("%s\n", str) --> puts(str)
> > if (FormatStr == "%s\n" && CI->getNumArgOperands()...