<div dir="ltr">Hi Sergey,<div><br></div><div>Thanks for working on this! The answer is slightly more involved though, I think.</div><div><br></div><div>As shown in your testcase, your change emits the sequence "ldr; str; ldr; str". The ideal expansion is "ldp; stp; ldp; stp;". That way we still do 128-bit loads and stores.</div>
<div><br></div><div>In fact, our microarchitects have recommended (through internal channels) that the "ldp; stp" sequence be used for memcpy-like operations - this will give portable performance. Therefore, the change should also be made for at least A57. I'll let Tim or Jim comment on Cyclone.</div>
<div><br></div><div>So to generate "ldp stp", the inline memcpy expander needs to generate "ldr; ldr; str; str;". The ldp/stp pass will then squish these together.</div><div><br></div><div>A similar thing is done in the ARM target (which gets combined into LDRD or LDM), but it's ARM-only. I think some logic needs to me moved into the target-independent part of codegen.</div>
<div><br></div><div>Cheers,</div><div><br></div><div>James</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 15 July 2014 09:15, Sergey Dmitrouk <span dir="ltr"><<a href="mailto:sdmitrouk@accesssoftek.com" target="_blank">sdmitrouk@accesssoftek.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Basing on the following information from [this post][0] by James Molloy:<br>
<br>
  * Our inline memcpy expansion pass is emitting "LDR q0, [..]; STR q0,<br>
  [..]" pairs, which is less than ideal on A53. If we switched to<br>
  emitting "LDP x0, x1, [..]; STP x0, x1, [..]", we'd get around 30%<br>
  better inline memcpy performance on A53. A57 seems to deal well with<br>
  the LDR q sequence.<br>
<br>
I've made a patch (attached) that does this for Cortex-A53.  Please<br>
take a look at it.<br>
<br>
Best regards,<br>
Sergey<br>
<br>
0: <a href="http://article.gmane.org/gmane.comp.compilers.llvm.devel/74269" target="_blank">http://article.gmane.org/gmane.comp.compilers.llvm.devel/74269</a><br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>