<div dir="ltr">Hi Rafael,<div><br></div><div>2014-06-03 11:48 GMT+08:00 Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span>:<br></div><div class="gmail_extra">
<div class="gmail_quote"><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 class="">> Thanks. I will post an update version of your patch as soon as that one is in.<br>

<br>
</div>And that took a long time, sorry about that :-(<br>
<br>
Attached is my attempt to forward port the patch. I didn't change the<br>
profitability check or the use of getGlobalMergeAlignment.<br></blockquote><div><br></div><div>Appreciate your great effort on modifying global alias implementation and supporting global symbol offset for global alias! Also thanks a lot for your merging work for my patch.</div>
<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">
<br>
One issue is that the ARM64 -> AArch64 transition happened and it<br>
seems that for one test we are not produce as good case as before. At<br>
the IR level the constant is merged, be we still compute the address<br>
twice, not sure why,  sorry.<br>
<br></blockquote><div>The AArch64 in my old patch refers to the old AArch64, and we don't have this problem for old AArch64. This is a known issue for this new AArch64(Migrated from ARM64). </div><div><br></div><div>
Previously Quentin kindly helped to investigated how to solve the ARM64 back-end issue, but so far it seems we it is still not sure if there is anything wrong with Quentin's patch, so this is why I want to commit my patch first and then I will try to pick up Quentin's patch to triage the new AArch64 back-end solution.</div>
<div><br></div><div>Now I removed it those failure tests and added FIXME in the test case.</div><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">

Would you mind taking a look and posting this again? Do CC myself and<br>
Nick. If I remember correctly the only remaining concern was why<br>
getGlobalMergeAlignment was needed and the command line options.  A<br>
better profitability check would be nice, but can be just a FIXME for<br>
now.<br></blockquote><div><br></div><div>I think there are two issues you mentioned</div><div>(1) We probably should change the global merge algorithm by considering the global symbols function by function, which could finally benefit linker to remove dead global symbols. I think I agree with that, but I want to leave it for further improvement in future, so I added a FIXME in my new patch to explain the issue.</div>
<div>(2) We should avoid adding target dependent interfaces in middle-end, so it would be better we don't add getGlobalMergeAlignment. I consider it again, and think we still need this, and it is orthogonal with (1). For AArch64, we need this because we want to make sure the merged global variable doesn't cross page boundary, and this could finally remove one more "addition" instruction finally.</div>
<div> </div><div>Thanks,</div><div>-Jiangning</div><div><br></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">
<br>
Thanks,<br>
Rafael<br>
</blockquote></div><br></div></div>