search for: repalcealluseswith

Displaying 5 results from an estimated 5 matches for "repalcealluseswith".

2012 Jun 18
2
[LLVMdev] Which pass converts call printf to puts?
Ok. So it seems CI->eraseFromParent() removed the old instruction and the new one is inserted right after this one in the inner function in the case of printf->puts. There is another line CI->repalceAllUsesWith(Result). I think this line could also do the replacement besides inserting the new one in the inner function. What's the difference of these 2 replacement methods? Also thanks for your reminder of CC the mailing list. -Thomson On Mon, Jun 18, 2012 at 4:08 PM, Christoph Erhardt <christoph...
2012 Jun 18
0
[LLVMdev] Which pass converts call printf to puts?
Hi Thomson, > Ok. So it seems CI->eraseFromParent() removed the old instruction and > the new one is inserted right after this one in the inner function in > the case of printf->puts. There is another line > CI->repalceAllUsesWith(Result). I think this line could also do the > replacement besides inserting the new one in the inner function. What's > the difference of these 2 replacement methods? whenever an instruction is replaced, all other instructions that use its result (as an input operand) have to be told to...
2012 Jun 18
2
[LLVMdev] Which pass converts call printf to puts?
...;christoph at sicherha.de>wrote: > Hi Thomson, > > > Ok. So it seems CI->eraseFromParent() removed the old instruction and > > the new one is inserted right after this one in the inner function in > > the case of printf->puts. There is another line > > CI->repalceAllUsesWith(Result). I think this line could also do the > > replacement besides inserting the new one in the inner function. What's > > the difference of these 2 replacement methods? > whenever an instruction is replaced, all other instructions that use its > result (as an input operand...
2012 Jun 18
0
[LLVMdev] Which pass converts call printf to puts?
Hi Thomson, the new call to puts() is inserted right away, whereas the old call to printf() is removed a bit later in SimplifyLibCalls::runOnFunction(). If you browse the code a bit and backtrack the call stack to see what happens with the return value of PrintFOpt::OptimizeFixedFormatString(), you will stumble upon this segment in SimplifyLibCalls.cpp:1703ff.: // Try to optimize this call.
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>