<div dir="ltr">Sorry I didn't update the original thread before I implement this patch. My understanding was Hal proposed IR level sinking at CGP, and I proposed enhancing MachineSinking and Hal thinks that's also an workable plan.<div><br></div><div>But when I started implementing this in MachineSinking, I found that the alias info support for loop at machine level is too weak. That's why MachineLICM only handles function invariant load motion instead of loop invariant load motion. I guess that's also the reasoning of the original comment in MachineSink.cpp (Machine sinking should not replace IR sinking).</div><div><br></div><div>For now, the design is:</div><div><br></div><div>1. IR LICM handles most accurate hoisting at early stage</div><div>2. IR Sinking handles most accurate sinking before CGP</div><div>3. Machine LICM handles simple hoisting at machine level</div><div>4. MachineSinking handles simple sinking at machine level</div><div><br></div><div>I think this design makes sense because:</div><div><br></div><div>1. We don't need to introduce sophisticated alias analysis to machine level loops</div><div>2. It's in perfect symmetry</div><div><br></div><div>But I'm open to discussions on other design alternatives.</div><div><br></div><div>Thanks,</div><div>Dehao</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 30, 2016 at 11:55 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for that context.<div><br></div><div>However, the conclusion there seemed to be to improve the MachineSinking pass rather than produce an IR level sinking pass, and I don't see anywhere that this direction change is explained.</div></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Sat, Jul 30, 2016 at 10:37 PM Xinliang David Li via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">It seems phab did not have all the conversations recorded. Complete<br>
discussion can be found in llvm-commits archive<br>
<br>
On Sat, Jul 30, 2016 at 10:31 PM, Xinliang David Li <<a href="mailto:davidxl@google.com" target="_blank">davidxl@google.com</a>> wrote:<br>
> See discussions in <a href="https://reviews.llvm.org/D19950" rel="noreferrer" target="_blank">https://reviews.llvm.org/D19950</a><br>
><br>
> David<br>
><br>
> On Sat, Jul 30, 2016 at 10:18 PM, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>> wrote:<br>
>> chandlerc added a subscriber: chandlerc.<br>
>> chandlerc added a comment.<br>
>><br>
>> Have you talked to anyone about the design for this?<br>
>><br>
>> I know Daniel Jasper, Quentin, and several others have looked at similar things before. Previous attempts have focused on using MachineLICM to do sinking as well as hoisting. While I don't have a strong opinion about one design over the other, we should be consistent about the plan here, and possibly consolidate some of the logic.<br>
>><br>
>><br>
>> <a href="https://reviews.llvm.org/D22778" rel="noreferrer" target="_blank">https://reviews.llvm.org/D22778</a><br>
>><br>
>><br>
>><br></div></div>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</blockquote></div><br></div>