<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Chandler,</div><div><br></div><div>What allocation means here (on a second thought that is not super clear) is the number of ports an instruction uses.</div><div><br></div><div>Regarding the benchmarks, the numbers are unchanged on the llvm test suite + specs.</div><div><br></div><div>In fact, this commit is just the first step toward performance improvements. Indeed, this hook is not yet sufficient to make LSR to prefer the addressing mode of the form 'reg'  compared to those of the form 'reg1 + reg2 * scale'.</div><div>Indeed, currently we still prefer 'reg1 + reg2 * scale' to 'reg', in many cases and in particular with scale = 1, which is wrong performance wise. I am working on fixing this.</div><div><br></div><div>With my current prototype, I see up to 30% speed up on small kernels.</div><div><br></div><div>Thanks,</div><div>-Quentin</div><div><br>Envoyé de mon iPhone</div><div><br>Le 25 avr. 2014 à 18:23, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> a écrit :<br><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 25, 2014 at 6:11 PM, Quentin Colombet <span dir="ltr"><<a href="mailto:qcolombet@apple.com" target="_blank">qcolombet@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":54v" class="a3s" style="overflow:hidden">[X86] Implement TargetLowering::getScalingFactorCost hook.<br>
Scaling factors are not free on X86 because every "complex" addressing mode<br>
breaks the related instruction into 2 allocations instead of 1.</div></blockquote></div><br>I have no idea what you mean by "allocations" here.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Also, benchmarks?</div>
</div>
</div></blockquote></body></html>