<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi Jim,</div><div class="gmail_extra"><br><div class="gmail_quote">2014-04-15 4:28 GMT+08:00 Jim Grosbach <span dir="ltr"><<a href="mailto:grosbach@apple.com" target="_blank">grosbach@apple.com</a>></span>:<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">This sounds reasonable. Thanks, all.<br>
<div class=""><br>
> - CSE of ADRP optimization (Jiangning)<br>
<br>
</div>Quentin may have some input here. He’s done quite a lot of optimizations for ADRP sequences.<br>
<span class=""><font color="#888888"><br>
-Jim<br>
</font></span><div class=""><div class="h5"></div></div></blockquote></div><br>
</div><div class="gmail_extra"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Thanks for letting me know Quentin may have deep thought around this.</div></div><div class="gmail_extra">
<br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">ARM64 generates pseudo instructions ARM64::MOVaddr and friends in ISEL stage, which intends to guarantee address serialization (page address + in-page address), and exposes adrp finally by pass ExpandPseudoInsts. The assumption of ARM64 solution is we don't know the in-page offset can be fused into load/store or not at compile time, and this assumption would turn to be not true any longer for the solution of using global merge as I proposed with the patch.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">If simply apply the global merge solution to ARM64, probably we should avoid generating pseudo instruction MOVaddr and friends in ISEL stage, but I'm not sure if the LOH solution would still work or not, because,</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">1) ARM64 link-time optimization depends on LOH.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
2) We don't see linker plug-in in LLVM trunk and it would be hard for me to verify any thoughts.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
Any concrete suggestion of combining those different ADRP CSE solutions and tests would be appreciated! </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
Thanks,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">-Jiangning</div><br></div></div>