<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Ryan,<div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 14, 2016, at 7:49 AM, Ryan Taylor via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">I looked at this again and it appears that while spillAroundUses sets the register as 'dead', there is no checking to see if it's dead in subsequent iterations of the bundle loop. </div><div class=""><br class=""></div><div class="">Is this intentional?</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Mar 7, 2016 at 3:28 PM, Ryan Taylor <span dir="ltr" class=""><<a href="mailto:ryta1203@gmail.com" target="_blank" class="">ryta1203@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="">Looks like spillAroundUses is spilling multiple duplicate copies to the stack, for example, with some regs we get 1 storeRegToStack call, for others we get multiple (2-6+) and then these instructions are never eliminated.</div><div class=""><br class=""></div><div class="">Looking at spillAroundUses it looks like multiple duplicate COPYs are being generated, why? One for each use?</div></div></blockquote></div></div></div></blockquote><div><br class=""></div><div>We need a new virtual register for each use to have an independent coloring for each of them.</div><div>If it is not what you are seeing, I think I would need more information to help you.</div><div>For instance, the machine representation you have before and after spilling and why this is not appropriate.</div><div><br class=""></div><div>Cheers,</div><div>-Quentin</div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class=""><br class=""></div><div class="">The reg_bundle holds these multiple copies so that we are iterating over the same exact COPY instructions multiple times, even though each one hits the same spot in the function:</div><div class=""><br class=""></div><div class="">if (hoistSpill(OldLI, MI)) {</div><div class="">     MI->getOperand(0).setIsDead();</div><div class="">     DeadDefs.push_back(MI);</div><div class="">     continue;</div><div class="">}</div><div class=""><br class=""></div><div class="">Even when I add a check:</div><div class=""><br class=""></div><div class="">if (MI->getOperand(0)->isDead())</div><div class="">    continue;</div><div class=""><br class=""></div><div class="">This never checks to true, on the second, third, fourth, etc duplicate.</div><div class=""><br class=""></div><div class="">Not sure what I'm missing? Can someone give me a brief description of why these multiple COPYs are being written out (storeRegToStack is being called)?</div><div class=""><br class=""></div><div class="">Thanks.</div><div class=""><br class=""></div></div>
</blockquote></div><br class=""></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>