<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>I missed the original email with the patch. Do you mind sending it again ?</div><div><br></div><div>Thanks,</div><div>Nadav</div><br><div><div>On May 13, 2013, at 10:20 AM, Akira Hatanaka <<a href="mailto:ahatanak@gmail.com">ahatanak@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div>Hi Duncan,<br><br></div>No, it hasn't been reviewed yet.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 13, 2013 at 8:50 AM, Duncan Sands<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Hi Akira, did anything happen with this patch?<br><br>Ciao, Duncan.<div><div class="h5"><br><br>On 09/05/13 04:04, Akira Hatanaka wrote:<br></div></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div><div class="h5">The following code snippet taken from StackColoring::<u></u>remapInstructions clears a<br>mem operand if it can't guarantee whether the memoperand's underlying value<br>aliases with the merged allocas:<br><br>// Update the MachineMemOperand to use the new alloca.<br> <span class="Apple-converted-space"> </span>522 for (MachineInstr::mmo_iterator MM = I->memoperands_begin(),<br>....<br> <span class="Apple-converted-space"> </span>// Climb up and find the original alloca.<br> <span class="Apple-converted-space"> </span>532 V = GetUnderlyingObject(V);<br> <span class="Apple-converted-space"> </span>533 // If we did not find one, or if the one that we found is not in our<br> <span class="Apple-converted-space"> </span>534 // map, then move on.<br> <span class="Apple-converted-space"> </span>535 if (!V || !isa<AllocaInst>(V)) {<br> <span class="Apple-converted-space"> </span>536 // Clear mem operand since we don't know for sure that it doesn't<br> <span class="Apple-converted-space"> </span>537 // alias a merged alloca.<br> <span class="Apple-converted-space"> </span>538 MMO->setValue(0);<br> <span class="Apple-converted-space"> </span>539 continue;<br> <span class="Apple-converted-space"> </span>540 }<br><br>The attached patch makes the code above less conservative. It avoids clearing a<br>mem operand if its underlying value is a PseudoSourceValue and<br>PseudoSourceValue::isConstant returns true. This enables MachineLICM to hoist<br>loads from GOT out of a loop (see test case in stackcoloring-test.patch).<br><br>Please review.<br><br>Question: Why does it need to clear a mem operand if the underlying object is<br>not an AllocaInst? I am not sure if I understand the reason for this.<br><br><br><br></div></div>______________________________<u></u>_________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a><span class="Apple-converted-space"> </span> <span class="Apple-converted-space"> </span><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/<u></u>mailman/listinfo/llvmdev</a><br><br></blockquote><br>______________________________<u></u>_________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a><span class="Apple-converted-space"> </span> <span class="Apple-converted-space"> </span><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/<u></u>mailman/listinfo/llvmdev</a><br></blockquote></div><br></div>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><span class="Apple-converted-space"> </span> <a href="http://llvm.cs.uiuc.edu/">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></div></blockquote></div><br></body></html>